HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux WebLive 5.15.0-79-generic #86-Ubuntu SMP Mon Jul 10 16:07:21 UTC 2023 x86_64
User: ubuntu (1000)
PHP: 7.4.33
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: /var/www/html/wpbiancoarte/wp-content/plugins/qi-blocks/assets/dist/cards-gallery.js
(()=>{var e={2:(e,t,a)=>{var l=a(4335)(Object.keys,Object);e.exports=l},80:(e,t,a)=>{var l=a(6025),n=Array.prototype.splice;e.exports=function(e){var t=this.__data__,a=l(t,e);return!(a<0)&&(a==t.length-1?t.pop():n.call(t,a,1),--this.size,!0)}},270:(e,t,a)=>{var l=a(7068),n=a(346);e.exports=function e(t,a,r,o,i){return t===a||(null==t||null==a||!n(t)&&!n(a)?t!=t&&a!=a:l(t,a,r,o,e,i))}},294:e=>{e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},346:e=>{e.exports=function(e){return null!=e&&"object"==typeof e}},540:e=>{"use strict";e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},689:(e,t,a)=>{var l=a(2),n=Object.prototype.hasOwnProperty;e.exports=function(e,t,a,r,o,i){var s=1&a,c=l(e),u=c.length;if(u!=l(t).length&&!s)return!1;for(var p=u;p--;){var m=c[p];if(!(s?m in t:n.call(t,m)))return!1}var d=i.get(e),b=i.get(t);if(d&&b)return d==t&&b==e;var f=!0;i.set(e,t),i.set(t,e);for(var h=s;++p<u;){var g=e[m=c[p]],k=t[m];if(r)var _=s?r(k,g,m,t,e,i):r(g,k,m,e,t,i);if(!(void 0===_?g===k||o(g,k,a,r,i):_)){f=!1;break}h||(h="constructor"==m)}if(f&&!h){var v=e.constructor,y=t.constructor;v==y||!("constructor"in e)||!("constructor"in t)||"function"==typeof v&&v instanceof v&&"function"==typeof y&&y instanceof y||(f=!1)}return i.delete(e),i.delete(t),f}},828:(e,t,a)=>{var l=a(7556);e.exports=function(e){return null==e?"":l(e)}},882:e=>{e.exports=function(e,t,a,l){var n=-1,r=null==e?0:e.length;for(l&&r&&(a=e[++n]);++n<r;)a=t(a,e[n],n,e);return a}},999:(e,t,a)=>{var l=a(9302),n=a(6800);e.exports=function(e){return l(function(t,a){var l=-1,r=a.length,o=r>1?a[r-1]:void 0,i=r>2?a[2]:void 0;for(o=e.length>3&&"function"==typeof o?(r--,o):void 0,i&&n(a[0],a[1],i)&&(o=r<3?void 0:o,r=1),t=Object(t);++l<r;){var s=a[l];s&&e(t,s,l,o)}return t})}},1033:e=>{e.exports=function(e,t,a){switch(a.length){case 0:return e.call(t);case 1:return e.call(t,a[0]);case 2:return e.call(t,a[0],a[1]);case 3:return e.call(t,a[0],a[1],a[2])}return e.apply(t,a)}},1074:e=>{e.exports=function(e){return e.split("")}},1113:e=>{"use strict";e.exports=function(e,t){if(t.styleSheet)t.styleSheet.cssText=e;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(e))}}},1175:(e,t,a)=>{var l=a(6025);e.exports=function(e,t){var a=this.__data__,n=l(a,e);return n<0?(++this.size,a.push([e,t])):a[n][1]=t,this}},1331:(e,t,a)=>{var l=a(2552),n=a(8879),r=a(346),o=Function.prototype,i=Object.prototype,s=o.toString,c=i.hasOwnProperty,u=s.call(Object);e.exports=function(e){if(!r(e)||"[object Object]"!=l(e))return!1;var t=n(e);if(null===t)return!0;var a=c.call(t,"constructor")&&t.constructor;return"function"==typeof a&&a instanceof a&&s.call(a)==u}},1601:e=>{"use strict";e.exports=function(e){return e[1]}},1733:e=>{var t=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;e.exports=function(e){return e.match(t)||[]}},1791:(e,t,a)=>{var l=a(6547),n=a(3360);e.exports=function(e,t,a,r){var o=!a;a||(a={});for(var i=-1,s=t.length;++i<s;){var c=t[i],u=r?r(a[c],e[c],c,a,e):void 0;void 0===u&&(u=e[c]),o?n(a,c,u):l(a,c,u)}return a}},1882:(e,t,a)=>{var l=a(2552),n=a(3805);e.exports=function(e){if(!n(e))return!1;var t=l(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},1961:(e,t,a)=>{var l=a(9653);e.exports=function(e,t){var a=t?l(e.buffer):e.buffer;return new e.constructor(a,e.byteOffset,e.length)}},1986:e=>{e.exports=function(e,t){return e===t||e!=e&&t!=t}},2054:e=>{var t="\\ud800-\\udfff",a="["+t+"]",l="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",n="\\ud83c[\\udffb-\\udfff]",r="[^"+t+"]",o="(?:\\ud83c[\\udde6-\\uddff]){2}",i="[\\ud800-\\udbff][\\udc00-\\udfff]",s="(?:"+l+"|"+n+")"+"?",c="[\\ufe0e\\ufe0f]?",u=c+s+("(?:\\u200d(?:"+[r,o,i].join("|")+")"+c+s+")*"),p="(?:"+[r+l+"?",l,o,i,a].join("|")+")",m=RegExp(n+"(?="+n+")|"+p+u,"g");e.exports=function(e){return e.match(m)||[]}},2225:e=>{var t="\\ud800-\\udfff",a="\\u2700-\\u27bf",l="a-z\\xdf-\\xf6\\xf8-\\xff",n="A-Z\\xc0-\\xd6\\xd8-\\xde",r="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",o="["+r+"]",i="\\d+",s="["+a+"]",c="["+l+"]",u="[^"+t+r+i+a+l+n+"]",p="(?:\\ud83c[\\udde6-\\uddff]){2}",m="[\\ud800-\\udbff][\\udc00-\\udfff]",d="["+n+"]",b="(?:"+c+"|"+u+")",f="(?:"+d+"|"+u+")",h="(?:['’](?:d|ll|m|re|s|t|ve))?",g="(?:['’](?:D|LL|M|RE|S|T|VE))?",k="(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?",_="[\\ufe0e\\ufe0f]?",v=_+k+("(?:\\u200d(?:"+["[^"+t+"]",p,m].join("|")+")"+_+k+")*"),y="(?:"+[s,p,m].join("|")+")"+v,w=RegExp([d+"?"+c+"+"+h+"(?="+[o,d,"$"].join("|")+")",f+"+"+g+"(?="+[o,d+b,"$"].join("|")+")",d+"?"+b+"+"+h,d+"+"+g,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",i,y].join("|"),"g");e.exports=function(e){return e.match(w)||[]}},2404:(e,t,a)=>{var l=a(270);e.exports=function(e,t){return l(e,t)}},2428:e=>{e.exports=function(){return!1}},2507:(e,t,a)=>{var l=a(8754),n=a(9698),r=a(3912),o=a(3222);e.exports=function(e){return function(t){t=o(t);var a=n(t)?r(t):void 0,i=a?a[0]:t.charAt(0),s=a?l(a,1).join(""):t.slice(1);return i[e]()+s}}},2552:e=>{var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},2824:(e,t,a)=>{var l=a(7805),n=a(3290),r=a(1961),o=a(3007),i=a(5529),s=a(2428),c=a(6449),u=a(3693),p=a(3656),m=a(1882),d=a(3805),b=a(1331),f=a(7167),h=a(4974),g=a(9884);e.exports=function(e,t,a,k,_,v,y){var w=h(e,a),A=h(t,a),q=y.get(A);if(q)l(e,a,q);else{var S=v?v(w,A,a+"",e,t,y):void 0,x=void 0===S;if(x){var E=c(A),I=!E&&p(A),C=!E&&!I&&f(A);S=A,E||I||C?c(w)?S=w:u(w)?S=o(w):I?(x=!1,S=n(A,!0)):C?(x=!1,S=r(A,!0)):S=[]:b(A)||s(A)?(S=w,s(w)?S=g(w):d(w)&&!m(w)||(S=i(A))):x=!1}x&&(y.set(A,S),_(S,A,k,v,y),y.delete(A)),l(e,a,S)}}},2865:e=>{e.exports=function(e){return e}},3007:e=>{e.exports=function(e,t){var a=-1,l=e.length;for(t||(t=Array(l));++a<l;)t[a]=e[a];return t}},3221:e=>{e.exports=function(e){return function(t,a,l){for(var n=-1,r=Object(t),o=l(t),i=o.length;i--;){var s=o[e?i:++n];if(!1===a(r[s],s,r))break}return t}}},3222:e=>{e.exports=function(e){return e}},3243:(e,t,a)=>{var l=a(6110),n=function(){try{var e=l(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();e.exports=n},3290:(e,t,a)=>{e=a.nmd(e);var l=a(9325),n=t&&!t.nodeType&&t,r=n&&e&&!e.nodeType&&e,o=r&&r.exports===n?l.Buffer:void 0,i=o?o.allocUnsafe:void 0;e.exports=function(e,t){if(t)return e.slice();var a=e.length,l=i?i(a):new e.constructor(a);return e.copy(l),l}},3360:(e,t,a)=>{var l=a(3243);e.exports=function(e,t,a){"__proto__"==t&&l?l(e,t,{configurable:!0,enumerable:!0,value:a,writable:!0}):e[t]=a}},3488:e=>{e.exports=function(e){return e}},3656:e=>{e.exports=function(){return!1}},3693:(e,t,a)=>{var l=a(4894),n=a(346);e.exports=function(e){return n(e)&&l(e)}},3702:e=>{e.exports=function(){this.__data__=[],this.size=0}},3805:e=>{e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},3912:(e,t,a)=>{var l=a(1074),n=a(9698),r=a(2054);e.exports=function(e){return n(e)?r(e):l(e)}},4058:(e,t,a)=>{var l=a(4792),n=a(5539)(function(e,t,a){return t=t.toLowerCase(),e+(a?l(t):t)});e.exports=n},4248:e=>{e.exports=function(e,t){for(var a=-1,l=null==e?0:e.length;++a<l;)if(t(e[a],a,e))return!0;return!1}},4335:e=>{e.exports=function(e,t){return function(a){return e(t(a))}}},4739:(e,t,a)=>{var l=a(6025);e.exports=function(e){var t=this.__data__,a=l(t,e);return a<0?void 0:t[a][1]}},4792:(e,t,a)=>{var l=a(3222),n=a(5808);e.exports=function(e){return n(l(e).toLowerCase())}},4840:(e,t,a)=>{var l="object"==typeof a.g&&a.g&&a.g.Object===Object&&a.g;e.exports=l},4894:(e,t,a)=>{var l=a(1882),n=a(294);e.exports=function(e){return null!=e&&n(e.length)&&!l(e)}},4974:e=>{e.exports=function(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}},5056:(e,t,a)=>{"use strict";e.exports=function(e){var t=a.nc;t&&e.setAttribute("nonce",t)}},5072:e=>{"use strict";var t=[];function a(e){for(var a=-1,l=0;l<t.length;l++)if(t[l].identifier===e){a=l;break}return a}function l(e,l){for(var r={},o=[],i=0;i<e.length;i++){var s=e[i],c=l.base?s[0]+l.base:s[0],u=r[c]||0,p="".concat(c," ").concat(u);r[c]=u+1;var m=a(p),d={css:s[1],media:s[2],sourceMap:s[3],supports:s[4],layer:s[5]};if(-1!==m)t[m].references++,t[m].updater(d);else{var b=n(d,l);l.byIndex=i,t.splice(i,0,{identifier:p,updater:b,references:1})}o.push(p)}return o}function n(e,t){var a=t.domAPI(t);a.update(e);return function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap&&t.supports===e.supports&&t.layer===e.layer)return;a.update(e=t)}else a.remove()}}e.exports=function(e,n){var r=l(e=e||[],n=n||{});return function(e){e=e||[];for(var o=0;o<r.length;o++){var i=a(r[o]);t[i].references--}for(var s=l(e,n),c=0;c<r.length;c++){var u=a(r[c]);0===t[u].references&&(t[u].updater(),t.splice(u,1))}r=s}}},5160:e=>{e.exports=function(e,t,a){var l=-1,n=e.length;t<0&&(t=-t>n?0:n+t),(a=a>n?n:a)<0&&(a+=n),n=t>a?0:a-t>>>0,t>>>=0;for(var r=Array(n);++l<n;)r[l]=e[l+t];return r}},5250:(e,t,a)=>{var l=a(7217),n=a(7805),r=a(6649),o=a(2824),i=a(3805),s=a(7241),c=a(4974);e.exports=function e(t,a,u,p,m){t!==a&&r(a,function(r,s){if(m||(m=new l),i(r))o(t,a,s,u,e,p,m);else{var d=p?p(c(t,s),r,s+"",t,a,m):void 0;void 0===d&&(d=r),n(t,s,d)}},s)}},5287:(e,t)=>{"use strict";var a=Symbol.for("react.element"),l=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),i=Symbol.for("react.provider"),s=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),p=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),d=Symbol.iterator;var b={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},f=Object.assign,h={};function g(e,t,a){this.props=e,this.context=t,this.refs=h,this.updater=a||b}function k(){}function _(e,t,a){this.props=e,this.context=t,this.refs=h,this.updater=a||b}g.prototype.isReactComponent={},g.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")},g.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},k.prototype=g.prototype;var v=_.prototype=new k;v.constructor=_,f(v,g.prototype),v.isPureReactComponent=!0;var y=Array.isArray,w=Object.prototype.hasOwnProperty,A={current:null},q={key:!0,ref:!0,__self:!0,__source:!0};function S(e,t,l){var n,r={},o=null,i=null;if(null!=t)for(n in void 0!==t.ref&&(i=t.ref),void 0!==t.key&&(o=""+t.key),t)w.call(t,n)&&!q.hasOwnProperty(n)&&(r[n]=t[n]);var s=arguments.length-2;if(1===s)r.children=l;else if(1<s){for(var c=Array(s),u=0;u<s;u++)c[u]=arguments[u+2];r.children=c}if(e&&e.defaultProps)for(n in s=e.defaultProps)void 0===r[n]&&(r[n]=s[n]);return{$$typeof:a,type:e,key:o,ref:i,props:r,_owner:A.current}}function x(e){return"object"==typeof e&&null!==e&&e.$$typeof===a}var E=/\/+/g;function I(e,t){return"object"==typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(e){return t[e]})}(""+e.key):t.toString(36)}function C(e,t,n,r,o){var i=typeof e;"undefined"!==i&&"boolean"!==i||(e=null);var s=!1;if(null===e)s=!0;else switch(i){case"string":case"number":s=!0;break;case"object":switch(e.$$typeof){case a:case l:s=!0}}if(s)return o=o(s=e),e=""===r?"."+I(s,0):r,y(o)?(n="",null!=e&&(n=e.replace(E,"$&/")+"/"),C(o,t,n,"",function(e){return e})):null!=o&&(x(o)&&(o=function(e,t){return{$$typeof:a,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}(o,n+(!o.key||s&&s.key===o.key?"":(""+o.key).replace(E,"$&/")+"/")+e)),t.push(o)),1;if(s=0,r=""===r?".":r+":",y(e))for(var c=0;c<e.length;c++){var u=r+I(i=e[c],c);s+=C(i,t,n,u,o)}else if(u=function(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=d&&e[d]||e["@@iterator"])?e:null}(e),"function"==typeof u)for(e=u.call(e),c=0;!(i=e.next()).done;)s+=C(i=i.value,t,n,u=r+I(i,c++),o);else if("object"===i)throw t=String(e),Error("Objects are not valid as a React child (found: "+("[object Object]"===t?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return s}function T(e,t,a){if(null==e)return e;var l=[],n=0;return C(e,l,"","",function(e){return t.call(a,e,n++)}),l}function N(e){if(-1===e._status){var t=e._result;(t=t()).then(function(t){0!==e._status&&-1!==e._status||(e._status=1,e._result=t)},function(t){0!==e._status&&-1!==e._status||(e._status=2,e._result=t)}),-1===e._status&&(e._status=0,e._result=t)}if(1===e._status)return e._result.default;throw e._result}var B={current:null},P={transition:null};function O(){throw Error("act(...) is not supported in production builds of React.")}t.createElement=S},5288:e=>{e.exports=function(e,t){return e===t||e!=e&&t!=t}},5364:(e,t,a)=>{var l=a(5250),n=a(999)(function(e,t,a){l(e,t,a)});e.exports=n},5434:e=>{var t=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;e.exports=function(e){return t.test(e)}},5527:e=>{e.exports=function(){return!1}},5529:(e,t,a)=>{var l=a(9344),n=a(8879),r=a(5527);e.exports=function(e){return"function"!=typeof e.constructor||r(e)?{}:l(n(e))}},5539:(e,t,a)=>{var l=a(882),n=a(828),r=a(6645),o=RegExp("['’]","g");e.exports=function(e){return function(t){return l(r(n(t).replace(o,"")),e,"")}}},5808:(e,t,a)=>{var l=a(2507)("toUpperCase");e.exports=l},5861:e=>{var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},5911:(e,t,a)=>{var l=a(8859),n=a(4248),r=a(9219);e.exports=function(e,t,a,o,i,s){var c=1&a,u=e.length,p=t.length;if(u!=p&&!(c&&p>u))return!1;var m=s.get(e),d=s.get(t);if(m&&d)return m==t&&d==e;var b=-1,f=!0,h=2&a?new l:void 0;for(s.set(e,t),s.set(t,e);++b<u;){var g=e[b],k=t[b];if(o)var _=c?o(k,g,b,t,e,s):o(g,k,b,e,t,s);if(void 0!==_){if(_)continue;f=!1;break}if(h){if(!n(t,function(e,t){if(!r(h,t)&&(g===e||i(g,e,a,o,s)))return h.push(t)})){f=!1;break}}else if(g!==k&&!i(g,k,a,o,s)){f=!1;break}}return s.delete(e),s.delete(t),f}},6025:(e,t,a)=>{var l=a(5288);e.exports=function(e,t){for(var a=e.length;a--;)if(l(e[a][0],t))return a;return-1}},6110:e=>{e.exports=function(e,t){return null==e?void 0:e[t]}},6131:e=>{e.exports=function(e,t,a){for(var l=a-1,n=e.length;++l<n;)if(e[l]===t)return l;return-1}},6314:e=>{"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map(function(t){var a="",l=void 0!==t[5];return t[4]&&(a+="@supports (".concat(t[4],") {")),t[2]&&(a+="@media ".concat(t[2]," {")),l&&(a+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),a+=e(t),l&&(a+="}"),t[2]&&(a+="}"),t[4]&&(a+="}"),a}).join("")},t.i=function(e,a,l,n,r){"string"==typeof e&&(e=[[null,e,void 0]]);var o={};if(l)for(var i=0;i<this.length;i++){var s=this[i][0];null!=s&&(o[s]=!0)}for(var c=0;c<e.length;c++){var u=[].concat(e[c]);l&&o[u[0]]||(void 0!==r&&(void 0===u[5]||(u[1]="@layer".concat(u[5].length>0?" ".concat(u[5]):""," {").concat(u[1],"}")),u[5]=r),a&&(u[2]?(u[1]="@media ".concat(u[2]," {").concat(u[1],"}"),u[2]=a):u[2]=a),n&&(u[4]?(u[1]="@supports (".concat(u[4],") {").concat(u[1],"}"),u[4]=n):u[4]="".concat(n)),t.push(u))}},t}},6449:e=>{var t=Array.isArray;e.exports=t},6540:(e,t,a)=>{"use strict";e.exports=a(5287)},6547:(e,t,a)=>{var l=a(3360),n=a(5288),r=Object.prototype.hasOwnProperty;e.exports=function(e,t,a){var o=e[t];r.call(e,t)&&n(o,a)&&(void 0!==a||t in e)||l(e,t,a)}},6645:(e,t,a)=>{var l=a(1733),n=a(5434),r=a(3222),o=a(2225);e.exports=function(e,t,a){return e=r(e),void 0===(t=a?void 0:t)?n(e)?o(e):l(e):e.match(t)||[]}},6649:(e,t,a)=>{var l=a(3221)();e.exports=l},6757:(e,t,a)=>{var l=a(1033),n=Math.max;e.exports=function(e,t,a){return t=n(void 0===t?e.length-1:t,0),function(){for(var r=arguments,o=-1,i=n(r.length-t,0),s=Array(i);++o<i;)s[o]=r[t+o];o=-1;for(var c=Array(t+1);++o<t;)c[o]=r[o];return c[t]=a(s),l(e,this,c)}}},6800:e=>{e.exports=function(){return!1}},6942:(e,t)=>{var a;!function(){"use strict";var l={}.hasOwnProperty;function n(){for(var e="",t=0;t<arguments.length;t++){var a=arguments[t];a&&(e=o(e,r(a)))}return e}function r(e){if("string"==typeof e||"number"==typeof e)return e;if("object"!=typeof e)return"";if(Array.isArray(e))return n.apply(null,e);if(e.toString!==Object.prototype.toString&&!e.toString.toString().includes("[native code]"))return e.toString();var t="";for(var a in e)l.call(e,a)&&e[a]&&(t=o(t,a));return t}function o(e,t){return t?e?e+" "+t:e+t:e}e.exports?(n.default=n,e.exports=n):void 0===(a=function(){return n}.apply(t,[]))||(e.exports=a)}()},7068:(e,t,a)=>{var l=a(7217),n=a(5911),r=a(1986),o=a(689),i=a(5861),s=a(6449),c=a(3656),u=a(7167),p="[object Arguments]",m="[object Array]",d="[object Object]",b=Object.prototype.hasOwnProperty;e.exports=function(e,t,a,f,h,g){var k=s(e),_=s(t),v=k?m:i(e),y=_?m:i(t),w=(v=v==p?d:v)==d,A=(y=y==p?d:y)==d,q=v==y;if(q&&c(e)){if(!c(t))return!1;k=!0,w=!1}if(q&&!w)return g||(g=new l),k||u(e)?n(e,t,a,f,h,g):r(e,t,v,a,f,h,g);if(!(1&a)){var S=w&&b.call(e,"__wrapped__"),x=A&&b.call(t,"__wrapped__");if(S||x){var E=S?e.value():e,I=x?t.value():t;return g||(g=new l),h(E,I,a,f,g)}}return!!q&&(g||(g=new l),o(e,t,a,f,h,g))}},7167:e=>{e.exports=function(){return!1}},7217:(e,t,a)=>{var l=a(3702),n=a(80),r=a(4739),o=a(8655),i=a(1175);function s(e){var t=-1,a=null==e?0:e.length;for(this.clear();++t<a;){var l=e[t];this.set(l[0],l[1])}}s.prototype.clear=l,s.prototype.delete=n,s.prototype.get=r,s.prototype.has=o,s.prototype.set=i,e.exports=s},7241:e=>{e.exports=function(e){var t=[];if(null!=e)for(var a in Object(e))t.push(a);return t}},7556:e=>{e.exports=function(e){return e}},7659:e=>{"use strict";var t={};e.exports=function(e,a){var l=function(e){if(void 0===t[e]){var a=document.querySelector(e);if(window.HTMLIFrameElement&&a instanceof window.HTMLIFrameElement)try{a=a.contentDocument.head}catch(e){a=null}t[e]=a}return t[e]}(e);if(!l)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");l.appendChild(a)}},7805:(e,t,a)=>{var l=a(3360),n=a(5288);e.exports=function(e,t,a){(void 0!==a&&!n(e[t],a)||void 0===a&&!(t in e))&&l(e,t,a)}},7825:e=>{"use strict";e.exports=function(e){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var t=e.insertStyleElement(e);return{update:function(a){!function(e,t,a){var l="";a.supports&&(l+="@supports (".concat(a.supports,") {")),a.media&&(l+="@media ".concat(a.media," {"));var n=void 0!==a.layer;n&&(l+="@layer".concat(a.layer.length>0?" ".concat(a.layer):""," {")),l+=a.css,n&&(l+="}"),a.media&&(l+="}"),a.supports&&(l+="}");var r=a.sourceMap;r&&"undefined"!=typeof btoa&&(l+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(r))))," */")),t.styleTagTransform(l,e,t.options)}(t,e,a)},remove:function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(t)}}}},7828:(e,t,a)=>{var l=a(9325).Uint8Array;e.exports=l},8655:(e,t,a)=>{var l=a(6025);e.exports=function(e){return l(this.__data__,e)>-1}},8754:(e,t,a)=>{var l=a(5160);e.exports=function(e,t,a){var n=e.length;return a=void 0===a?n:a,!t&&a>=n?e:l(e,t,a)}},8859:(e,t,a)=>{var l=a(6449);e.exports=function(){if(!arguments.length)return[];var e=arguments[0];return l(e)?e:[e]}},8879:(e,t,a)=>{var l=a(4335)(Object.getPrototypeOf,Object);e.exports=l},9008:(e,t,a)=>{"use strict";a.d(t,{A:()=>i});var l=a(1601),n=a.n(l),r=a(6314),o=a.n(r)()(n());o.push([e.id,".qi-preview-screen-tablet .qi-block-cards-gallery .qodef-m-fake-card,.qi-preview-screen-mobile .qi-block-cards-gallery .qodef-m-fake-card{transform:scale(0.8)}.qi-preview-screen-tablet .qi-block-cards-gallery.qodef-orientation--left .qodef-m-card,.qi-preview-screen-mobile .qi-block-cards-gallery.qodef-orientation--left .qodef-m-card{transform:scale(0.8)}.qi-preview-screen-tablet .qi-block-cards-gallery.qodef-orientation--left .qodef-m-card.qodef-out,.qi-preview-screen-mobile .qi-block-cards-gallery.qodef-orientation--left .qodef-m-card.qodef-out{transform:translateX(-100%)}.qi-preview-screen-tablet .qi-block-cards-gallery.qodef-orientation--left .qodef-m-card:nth-last-child(6),.qi-preview-screen-mobile .qi-block-cards-gallery.qodef-orientation--left .qodef-m-card:nth-last-child(6){transform:scale(0.3) translateX(84%)}.qi-preview-screen-tablet .qi-block-cards-gallery.qodef-orientation--left .qodef-m-card:nth-last-child(5),.qi-preview-screen-mobile .qi-block-cards-gallery.qodef-orientation--left .qodef-m-card:nth-last-child(5){transform:scale(0.4) translateX(60%)}.qi-preview-screen-tablet .qi-block-cards-gallery.qodef-orientation--left .qodef-m-card:nth-last-child(4),.qi-preview-screen-mobile .qi-block-cards-gallery.qodef-orientation--left .qodef-m-card:nth-last-child(4){transform:scale(0.5) translateX(39%)}.qi-preview-screen-tablet .qi-block-cards-gallery.qodef-orientation--left .qodef-m-card:nth-last-child(3),.qi-preview-screen-mobile .qi-block-cards-gallery.qodef-orientation--left .qodef-m-card:nth-last-child(3){transform:scale(0.6) translateX(25%)}.qi-preview-screen-tablet .qi-block-cards-gallery.qodef-orientation--left .qodef-m-card:nth-last-child(2),.qi-preview-screen-mobile .qi-block-cards-gallery.qodef-orientation--left .qodef-m-card:nth-last-child(2){transform:scale(0.7) translateX(11.2%)}.qi-preview-screen-tablet .qi-block-cards-gallery.qodef-orientation--right .qodef-m-card,.qi-preview-screen-mobile .qi-block-cards-gallery.qodef-orientation--right .qodef-m-card{transform:scale(0.8)}.qi-preview-screen-tablet .qi-block-cards-gallery.qodef-orientation--right .qodef-m-card.qodef-out,.qi-preview-screen-mobile .qi-block-cards-gallery.qodef-orientation--right .qodef-m-card.qodef-out{transform:translateX(100%)}.qi-preview-screen-tablet .qi-block-cards-gallery.qodef-orientation--right .qodef-m-card:nth-last-child(6),.qi-preview-screen-mobile .qi-block-cards-gallery.qodef-orientation--right .qodef-m-card:nth-last-child(6){transform:scale(0.3) translateX(-84%)}.qi-preview-screen-tablet .qi-block-cards-gallery.qodef-orientation--right .qodef-m-card:nth-last-child(5),.qi-preview-screen-mobile .qi-block-cards-gallery.qodef-orientation--right .qodef-m-card:nth-last-child(5){transform:scale(0.4) translateX(-60%)}.qi-preview-screen-tablet .qi-block-cards-gallery.qodef-orientation--right .qodef-m-card:nth-last-child(4),.qi-preview-screen-mobile .qi-block-cards-gallery.qodef-orientation--right .qodef-m-card:nth-last-child(4){transform:scale(0.5) translateX(-39%)}.qi-preview-screen-tablet .qi-block-cards-gallery.qodef-orientation--right .qodef-m-card:nth-last-child(3),.qi-preview-screen-mobile .qi-block-cards-gallery.qodef-orientation--right .qodef-m-card:nth-last-child(3){transform:scale(0.6) translateX(-25%)}.qi-preview-screen-tablet .qi-block-cards-gallery.qodef-orientation--right .qodef-m-card:nth-last-child(2),.qi-preview-screen-mobile .qi-block-cards-gallery.qodef-orientation--right .qodef-m-card:nth-last-child(2){transform:scale(0.7) translateX(-11.2%)}",""]);const i=o},9219:(e,t,a)=>{var l=a(6131);e.exports=function(e,t){return!!(null==e?0:e.length)&&l(e,t,0)>-1}},9302:(e,t,a)=>{var l=a(3488),n=a(6757),r=a(2865);e.exports=function(e,t){return r(n(e,t,l),e+"")}},9325:(e,t,a)=>{var l=a(4840),n="object"==typeof self&&self&&self.Object===Object&&self,r=l||n||Function("return this")();e.exports=r},9344:(e,t,a)=>{var l=a(3805),n=Object.create,r=function(){function e(){}return function(t){if(!l(t))return{};if(n)return n(t);e.prototype=t;var a=new e;return e.prototype=void 0,a}}();e.exports=r},9653:(e,t,a)=>{var l=a(7828);e.exports=function(e){var t=new e.constructor(e.byteLength);return new l(t).set(new l(e)),t}},9698:e=>{var t=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");e.exports=function(e){return t.test(e)}},9884:(e,t,a)=>{var l=a(1791),n=a(7241);e.exports=function(e){return l(e,n(e))}}},t={};function a(l){var n=t[l];if(void 0!==n)return n.exports;var r=t[l]={id:l,loaded:!1,exports:{}};return e[l](r,r.exports,a),r.loaded=!0,r.exports}a.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return a.d(t,{a:t}),t},a.d=(e,t)=>{for(var l in t)a.o(t,l)&&!a.o(e,l)&&Object.defineProperty(e,l,{enumerable:!0,get:t[l]})},a.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),a.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),a.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),a.nc=void 0,(()=>{"use strict";const e=wp.i18n,t=wp.blocks;var l=a(4058),n=a.n(l);const r=wp.hooks,o=wp.data;var i,s=a(6540);function c(){return c=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var l in a)({}).hasOwnProperty.call(a,l)&&(e[l]=a[l])}return e},c.apply(null,arguments)}const u=e=>s.createElement("svg",c({xmlns:"http://www.w3.org/2000/svg",xmlSpace:"preserve",viewBox:"0 0 24 24"},e),i||(i=s.createElement("path",{d:"M13 18h2c.6 0 1 .4 1 1s-.4 1-1 1H9c-.6 0-1-.4-1-1s.4-1 1-1h2v-2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2h16c1.1 0 2 .9 2 2v8c0 1.1-.9 2-2 2h-7zM4 6v8h16V6z"})));var p;function m(){return m=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var l in a)({}).hasOwnProperty.call(a,l)&&(e[l]=a[l])}return e},m.apply(null,arguments)}const d=e=>s.createElement("svg",m({xmlns:"http://www.w3.org/2000/svg",xmlSpace:"preserve",viewBox:"0 0 24 24"},e),p||(p=s.createElement("path",{d:"M6 4v15h12V4zm0-2h12c1.1 0 2 .9 2 2v16c0 1.1-.9 2-2 2H6c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2"})));var b;function f(){return f=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var l in a)({}).hasOwnProperty.call(a,l)&&(e[l]=a[l])}return e},f.apply(null,arguments)}const h=e=>s.createElement("svg",f({xmlns:"http://www.w3.org/2000/svg",xmlSpace:"preserve",viewBox:"0 0 24 24"},e),b||(b=s.createElement("path",{d:"M8 2h8c1.1 0 2 .9 2 2v16c0 1.1-.9 2-2 2H8c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2m0 2v15h8V4z"}))),g="desktop",k={desktop:{label:(0,e.__)("Desktop","qi-blocks"),icon:wp.element.createElement(u,null)},tablet:{label:(0,e.__)("Tablet","qi-blocks"),icon:wp.element.createElement(d,null)},mobile:{label:(0,e.__)("Mobile","qi-blocks"),icon:wp.element.createElement(h,null)}};let _=g;const v=()=>_,y=wp.components,w=e=>{const t={...e},{blockAttributeKey:a,blockAttributes:l,setAttributes:n,repeater:r,repeaterItemIndex:o,repeaterItemKey:i,repeaterSetAttributes:s,repeaterGetAttributes:c}=t;return t.getAttributeValue=()=>{let e=l[a];return r&&(e=c(i,o)),e||!1},t.setAttributeValue=e=>{r?s(i,e,o):n({[a]:e})},wp.element.createElement("div",{className:"qodef-on-off-option"},wp.element.createElement(y.ToggleControl,{label:t.label,help:t.help,checked:t.getAttributeValue(),onChange:()=>t.setAttributeValue(!t.getAttributeValue())}))};w.defaultProps={label:(0,e.__)("Show","qi-blocks"),help:"",blockAttributeKey:"",blockAttributes:{},setAttributes:()=>{},repeater:!1,repeaterItemIndex:0,repeaterItemKey:"",repeaterSetAttributes:()=>{},repeaterGetAttributes:()=>{}};const A=w,q=[{classSuffix:"desktop",label:(0,e.__)("Hide On Desktop","qi-blocks"),blockAttributeKey:"hideOnDesktop"},{classSuffix:"tablet",label:(0,e.__)("Hide On Tablet","qi-blocks"),blockAttributeKey:"hideOnTablet"},{classSuffix:"mobile",label:(0,e.__)("Hide On Mobile","qi-blocks"),blockAttributeKey:"hideOnMobile"}],S=e=>{const t={...e},{label:a,description:l,blockAttributeKeys:n,blockAttributes:r,setAttributes:o}=t;return wp.element.createElement("div",{className:"qodef-visibility-group-option"},a&&wp.element.createElement("label",{className:"qodef-option-label"},a),l&&wp.element.createElement("p",{className:"qodef-option-description"},l),n.map(e=>wp.element.createElement(wp.element.Fragment,null,wp.element.createElement(A,{label:e.label,blockAttributeKey:e.blockAttributeKey,blockAttributes:r,setAttributes:o}))))};S.defaultProps={label:(0,e.__)("Visibility","qi-blocks"),description:(0,e.__)("Responsive visibility will take effect only on preview or live page, and not while editing in Gutenberg.","qi-blocks"),blockAttributeKeys:q,blockAttributes:{},setAttributes:()=>{}};const x=(e,t="")=>{const a=e=>B(t,e),l=[];return e[a("cssClasses")]&&l.push(e[a("cssClasses")]),void 0!==e[a("EntranceAnimation")]&&""!==e[a("EntranceAnimation")]&&(l.push("qodef-entrance-animation--on"),e[a("EntranceAnimationDuration")]&&l.push("qodef-animation-speed--"+e[a("EntranceAnimationDuration")])),e[a("BlockWidth")]&&l.push("qodef-width--"+e[a("BlockWidth")]),e[a("BlockWidthTablet")]&&l.push("qodef-width--tablet--"+e[a("BlockWidthTablet")]),e[a("BlockWidthMobile")]&&l.push("qodef-width--mobile--"+e[a("BlockWidthMobile")]),l.push((e=>{const t=[];return q.map(a=>{const l="qodef-hide-on--"+a.classSuffix,n=e[a.blockAttributeKey];t.includes(l)&&!n?t.filter(function(e){return e!==l}):!t.includes(l)&&n&&t.push(l)}),t.join(" ")})(e)),l.join(" ")},E=(e,t="")=>{let a=["qodef-block-container"];return z(e.uniqueClass,"all")&&a.push(e.uniqueClass),a.push(x(e,t)),a.join(" ")},I=(e,t="")=>{let a={};const l=((e,t="")=>{const a=(e,a="")=>B(t,e,a),l={};return void 0!==e[a("EntranceAnimation")]&&""!==e[a("EntranceAnimation")]&&(l["data-animation"]=e[a("EntranceAnimation")]),"custom"!==e[a("BlockWidth")]&&"custom"!==e[a("BlockWidthTablet")]&&"custom"!==e[a("BlockWidthMobile")]||["","Tablet","Mobile"].forEach(t=>{const n=e[a("BlockCustomWidth",t)],r=e[a("BlockCustomWidthDecimal",t)],o=e[a("BlockCustomWidthUnit",t)];R(o)&&n?l["data-width"+(t?"-"+t.toLowerCase():"")]=parseInt(n,10)+o:L(o)&&r&&(l["data-width"+(t?"-"+t.toLowerCase():"")]=parseFloat(r)+o)}),l})(e,t);return l&&(a={...a,...l}),a},C=(e,t="",a=[])=>N(e,t,a),T=(e,t,a=[])=>{if(!e)return"";let l=[`qi-block-${e}`,"qodef-block","qodef-m"];return z(t.attributes.className,"all")&&l.push(t.attributes.className),a&&(l=[...l,...a]),l.join(" ")},N=(e,t="",a=[])=>{const l=e=>B(t,e);if(!e)return"";let n=[];return z(e[l("cssId")],"all")&&n.push(e[l("cssId")]),a&&(n=[...n,...a]),n.join(" ")},B=(t,a,l)=>(t=t||"",a=a||"",l=l||"",n()((0,e.sprintf)("%s%s%s",t,a,l))),P=e=>e?e.charAt(0).toUpperCase()+e.slice(1):"",O=e=>e&&g!==e?P(e):"",D=(e,t)=>{let a=e.desktop;return"mobile"===t&&(a={...a,...e.tablet}),{...a,...e[t]}},V=(e,t=!0)=>{let a="";return Object.entries(e).map(([e,l])=>{a+=`${e.replace(/([A-Z])/g,(e,t,a)=>(a>0?"-":"")+e.toLowerCase())}: ${l} ${t?"!important":""};`}),a},R=e=>["px"].includes(e),L=e=>["em","rem","%","vw","vh"].includes(e),M=(e,t="integer")=>{let a="";return 0===e||"0"===e?a=0:e&&(a=parseInt(e,10),"decimal"===t&&(a=parseFloat(e))),a},z=(e,t="")=>{let a=void 0!==e&&""!==e;return"all"===t&&(a=void 0!==e&&e),a},U=e=>{let t="";return 0===e||"0"===e?t=0:e&&(t=e),t},K=(t,a=!0,l=[])=>{let n=[],o=[];if(t){switch(a&&(n=[{value:"",label:(0,e.__)("Default","qi-blocks")}]),t){case"no_yes":o=[{value:"no",label:(0,e.__)("No","qi-blocks")},{value:"yes",label:(0,e.__)("Yes","qi-blocks")}];break;case"yes_no":o=[{value:"yes",label:(0,e.__)("Yes","qi-blocks")},{value:"no",label:(0,e.__)("No","qi-blocks")}];break;case"link_target":o=[{value:"_self",label:(0,e.__)("Same Window","qi-blocks")},{value:"_blank",label:(0,e.__)("New Window","qi-blocks")}];break;case"column_gap":o=[{value:"huge",label:(0,e.__)("Huge (35)","qi-blocks")},{value:"large",label:(0,e.__)("Large (25)","qi-blocks")},{value:"medium",label:(0,e.__)("Medium (20)","qi-blocks")},{value:"normal",label:(0,e.__)("Normal (15)","qi-blocks")},{value:"small",label:(0,e.__)("Small (10)","qi-blocks")},{value:"tiny",label:(0,e.__)("Tiny (5)","qi-blocks")},{value:"no",label:(0,e.__)("No (0)","qi-blocks")}];break;case"columns_responsive":o=[{value:"predefined",label:(0,e.__)("Predefined","qi-blocks")},{value:"custom",label:(0,e.__)("Custom","qi-blocks")}];break;case"masonry_image_sizes":o=[{value:"square",label:(0,e.__)("Square","qi-blocks")},{value:"landscape",label:(0,e.__)("Landscape","qi-blocks")},{value:"portrait",label:(0,e.__)("Portrait","qi-blocks")},{value:"huge-square",label:(0,e.__)("Huge","qi-blocks")}];break;case"image_sizes":o=[{value:"full",label:(0,e.__)("Original","qi-blocks")},{value:"thumbnail",label:(0,e.__)("Thumbnail","qi-blocks")},{value:"medium",label:(0,e.__)("Medium","qi-blocks")},{value:"large",label:(0,e.__)("Large","qi-blocks")}];break;case"title_tag":o=[{value:"h1",label:(0,e.__)("H1","qi-blocks")},{value:"h2",label:(0,e.__)("H2","qi-blocks")},{value:"h3",label:(0,e.__)("H3","qi-blocks")},{value:"h4",label:(0,e.__)("H4","qi-blocks")},{value:"h5",label:(0,e.__)("H5","qi-blocks")},{value:"h6",label:(0,e.__)("H6","qi-blocks")},{value:"p",label:(0,e.__)("Paragraph","qi-blocks")}];break;case"font_weight":o=[{value:"normal",label:(0,e.__)("Normal","qi-blocks")},{value:"bold",label:(0,e.__)("Bold","qi-blocks")},{value:"100",label:(0,e.__)("Thin (100)","qi-blocks")},{value:"200",label:(0,e.__)("Extra Light (200)","qi-blocks")},{value:"300",label:(0,e.__)("Light (300)","qi-blocks")},{value:"400",label:(0,e.__)("Normal (400)","qi-blocks")},{value:"500",label:(0,e.__)("Medium (500)","qi-blocks")},{value:"600",label:(0,e.__)("Semi Bold (600)","qi-blocks")},{value:"700",label:(0,e.__)("Bold (700)","qi-blocks")},{value:"800",label:(0,e.__)("Extra Bold (800)","qi-blocks")},{value:"900",label:(0,e.__)("Black (900)","qi-blocks")}];break;case"text_transform":o=[{value:"none",label:(0,e.__)("None","qi-blocks")},{value:"uppercase",label:(0,e.__)("Uppercase","qi-blocks")},{value:"lowercase",label:(0,e.__)("Lowercase","qi-blocks")},{value:"capitalize",label:(0,e.__)("Capitalize","qi-blocks")},{value:"normal",label:(0,e.__)("Normal","qi-blocks")}];break;case"font_style":o=[{value:"normal",label:(0,e.__)("Normal","qi-blocks")},{value:"italic",label:(0,e.__)("Italic","qi-blocks")},{value:"oblique",label:(0,e.__)("Oblique","qi-blocks")}];break;case"text_decoration":o=[{value:"none",label:(0,e.__)("None","qi-blocks")},{value:"underline",label:(0,e.__)("Underline","qi-blocks")},{value:"overline",label:(0,e.__)("Overline","qi-blocks")},{value:"line-through",label:(0,e.__)("Line-Through","qi-blocks")}];break;case"background_position":o=[{value:"center center",label:(0,e.__)("Center Center","qi-blocks")},{value:"center left",label:(0,e.__)("Center Left","qi-blocks")},{value:"center right",label:(0,e.__)("Center Right","qi-blocks")},{value:"top center",label:(0,e.__)("Top Center","qi-blocks")},{value:"top left",label:(0,e.__)("Top Left","qi-blocks")},{value:"top right",label:(0,e.__)("Top Right","qi-blocks")},{value:"bottom center",label:(0,e.__)("Bottom Center","qi-blocks")},{value:"bottom left",label:(0,e.__)("Bottom Left","qi-blocks")},{value:"bottom right",label:(0,e.__)("Bottom Right","qi-blocks")}];break;case"background_attachment":o=[{value:"scroll",label:(0,e.__)("Scroll","qi-blocks")},{value:"fixed",label:(0,e.__)("Fixed","qi-blocks")}];break;case"background_repeat":o=[{value:"no-repeat",label:(0,e.__)("No-repeat","qi-blocks")},{value:"repeat",label:(0,e.__)("Repeat","qi-blocks")},{value:"repeat-x",label:(0,e.__)("Repeat-x","qi-blocks")},{value:"repeat-y",label:(0,e.__)("Repeat-y","qi-blocks")}];break;case"background_size":o=[{value:"auto",label:(0,e.__)("Auto","qi-blocks")},{value:"cover",label:(0,e.__)("Cover","qi-blocks")},{value:"contain",label:(0,e.__)("Contain","qi-blocks")}];break;case"horizontal_alignment":o=[{value:"left",label:(0,e.__)("Left","qi-blocks")},{value:"right",label:(0,e.__)("Right","qi-blocks")},{value:"center",label:(0,e.__)("Center","qi-blocks")}];break;case"vertical_alignment":o=[{value:"top",label:(0,e.__)("Top","qi-blocks")},{value:"middle",label:(0,e.__)("Middle","qi-blocks")},{value:"bottom",label:(0,e.__)("Bottom","qi-blocks")}];break;case"html_tag":o=[{value:"section",label:(0,e.__)("Section","qi-blocks")},{value:"div",label:(0,e.__)("Div","qi-blocks")},{value:"main",label:(0,e.__)("Main","qi-blocks")},{value:"article",label:(0,e.__)("Article","qi-blocks")},{value:"nav",label:(0,e.__)("Nav","qi-blocks")},{value:"footer",label:(0,e.__)("Footer","qi-blocks")},{value:"header",label:(0,e.__)("Header","qi-blocks")},{value:"aside",label:(0,e.__)("Aside","qi-blocks")}];break;case"appear_animation":o=[{value:"none",label:(0,e.__)("None","qi-blocks")},{value:"from-bottom",label:(0,e.__)("From Bottom","qi-blocks")},{value:"from-top",label:(0,e.__)("From Top","qi-blocks")},{value:"from-left",label:(0,e.__)("From Left","qi-blocks")},{value:"from-right",label:(0,e.__)("From Right","qi-blocks")},{value:"fade",label:(0,e.__)("Fade in","qi-blocks")}];break;case"appear_delay":o=[{value:"random",label:(0,e.__)("Random","qi-blocks")},{value:"ms",label:(0,e.__)("Set ms","qi-blocks")}];break;case"responsive_screens":o=[{value:"1024",label:(0,e.__)("Below 1024px","qi-blocks")},{value:"768",label:(0,e.__)("Below 768px","qi-blocks")},{value:"680",label:(0,e.__)("Below 680px","qi-blocks")},{value:"480",label:(0,e.__)("Below 480px","qi-blocks")}];break;case"order_by":o=[{value:"date",label:(0,e.__)("Date","qi-blocks")},{value:"id",label:(0,e.__)("ID","qi-blocks")},{value:"title",label:(0,e.__)("Title","qi-blocks")}];break;case"order":o=[{value:"desc",label:(0,e.__)("Descending","qi-blocks")},{value:"asc",label:(0,e.__)("Ascending","qi-blocks")}];break;case"border_style":o=[{value:"solid",label:(0,e.__)("Solid","qi-blocks")},{value:"dashed",label:(0,e.__)("Dashed","qi-blocks")},{value:"dotted",label:(0,e.__)("Dotted","qi-blocks")}]}n=[...n,...o],l&&(n=[...n,...l])}return(0,r.applyFilters)("qi-blocks-filter-options-pool",n)},j=(e,t,a,l)=>{let n={},r={},o={};return z(e)&&(z(t)&&(n[e]=t),z(a)&&(r[e]=a),z(l)&&(o[e]=l)),{desktop:n,tablet:r,mobile:o}},F=(e="",t="full")=>{let a="";if(e){const l=(0,o.select)("core").getMedia(e);if(!l)return"";const n=l.media_details.sizes;for(const e in n)if(e.includes(t)||e.includes("qi_blocks_image_size_"+t.replace("-","_"))){a=n[e].source_url;break}}return a},G=()=>({hideOnDesktop:{type:"boolean",default:!1},hideOnTablet:{type:"boolean",default:!1},hideOnMobile:{type:"boolean",default:!1}}),$=e=>{const{attrNameTemplate:t,attrName:a}=e,l=e=>B(t,a,e),n=!z(e,"all")||(e.allowUnitControl??!0),r=z(e,"all")&&e.disableDirections||[];let o={};return["Top","Right","Bottom","Left"].map(e=>{r.includes(e)||(o[l(e)]={type:"number",default:""},o[l(e+"Tablet")]={type:"number",default:""},o[l(e+"Mobile")]={type:"number",default:""},n&&(o[l(`${e}Decimal`)]={type:"number",default:""},o[l(`${e}DecimalTablet`)]={type:"number",default:""},o[l(`${e}DecimalMobile`)]={type:"number",default:""}))}),o[l("Unit")]={type:"string",default:"px"},o[l("UnitTablet")]={type:"string",default:"px"},o[l("UnitMobile")]={type:"string",default:"px"},o};$.defaultProps={attrNameTemplate:"",attrName:"",allowUnitControl:!0};const H=$,W=e=>{const{blockAttributeKey:t}=e,a=!!z(e,"all")&&(e.allowScreens??!1),l=!z(e,"all")||(e.allowUnits??!0),n=z(e,"all")&&e.optionType||"integer",r=z(e,"all")&&e.defaultValue||"",o="decimal"===n?r:"";let i={};return"integer"===n&&(i[t]={type:"number",default:r}),i[B(t,"Unit")]={type:"string",default:"px"},(l||"decimal"===n)&&(i[B(t,"Decimal")]={type:"number",default:o}),a&&(i[B(t,"Tablet")]={type:"number",default:""},i[B(t,"Mobile")]={type:"number",default:""},i[B(t,"UnitTablet")]={type:"string",default:"px"},i[B(t,"UnitMobile")]={type:"string",default:"px"},l&&(i[B(t,"DecimalTablet")]={type:"number",default:""},i[B(t,"DecimalMobile")]={type:"number",default:""})),i};W.defaultProps={allowScreens:!1,allowUnits:!0};const X=W,Y=e=>{const t=z(e,"all")&&e.attrNameTemplate||"",a=z(e,"all")&&e.attrName||"Background",l=e=>B(t,a+e),n=X({blockAttributeKey:l("XPosition"),allowScreens:!0}),r=X({blockAttributeKey:l("YPosition"),allowScreens:!0}),o=X({blockAttributeKey:l("SizeWidth"),allowScreens:!0});return{[l("Image")]:{type:"object",default:{id:null,url:"",alt:"",caption:""}},[l("ImageTablet")]:{type:"object",default:{id:null,url:"",alt:"",caption:""}},[l("ImageMobile")]:{type:"object",default:{id:null,url:"",alt:"",caption:""}},[l("Position")]:{type:"string",default:""},[l("PositionTablet")]:{type:"string",default:""},[l("PositionMobile")]:{type:"string",default:""},...n,...r,[l("Attachment")]:{type:"string",default:""},[l("Repeat")]:{type:"string",default:""},[l("RepeatTablet")]:{type:"string",default:""},[l("RepeatMobile")]:{type:"string",default:""},[l("Size")]:{type:"string",default:""},[l("SizeTablet")]:{type:"string",default:""},[l("SizeMobile")]:{type:"string",default:""},...o}};Y.defaultProps={attrNameTemplate:"",attrName:"Background"};const Z=Y,J=e=>{const t=z(e,"all")&&e.attrNameTemplate||"",a=e=>B(t,e),l=!!z(e,"all")&&(e.includeVideoBG??!1),n=Z({attrNameTemplate:t});let r={[a("BackgroundType")]:{type:"string",default:""},[a("BackgroundColor")]:{type:"string",default:""},...n,[a("BackgroundGradientColor1")]:{type:"string",default:""},[a("BackgroundGradientLocation1")]:{type:"number",default:""},[a("BackgroundGradientColor2")]:{type:"string",default:""},[a("BackgroundGradientLocation2")]:{type:"number",default:""},[a("BackgroundGradientType")]:{type:"string",default:"linear"},[a("BackgroundGradientTypeAngle")]:{type:"number",default:""},[a("BackgroundGradientTypePosition")]:{type:"string",default:"center center"}};if(l){const e={[a("BackgroundVideoLink")]:{type:"object",default:{id:null,url:"",alt:""}},[a("BackgroundVideoStartTime")]:{type:"number",default:""},[a("BackgroundVideoEndTime")]:{type:"number",default:""},[a("BackgroundVideoStartTime")]:{type:"number",default:""},[a("BackgroundVideoPlayOnce")]:{type:"boolean",default:!1},[a("BackgroundVideoPlayOnMobile")]:{type:"boolean",default:!1},[a("BackgroundVideoFallbackImage")]:{type:"object",default:{id:null,url:"",alt:""}}};r={...r,...e}}return r};J.defaultProps={attrNameTemplate:"",includeVideoBG:!1};const Q=J,ee=e=>{const t=z(e,"all")&&e.attrNameTemplate||"",a=z(e,"all")&&e.attrName||"",l=z(e,"all")&&e.defaultValue||"",n=e=>B(t,a+e);return{[n("")]:{type:"string",default:l},[n("Tablet")]:{type:"string",default:""},[n("Mobile")]:{type:"string",default:""}}};ee.defaultProps={attrNameTemplate:"",attrName:"",defaultValue:""};const te=ee,ae=e=>{const t=z(e,"all")&&e.attrNameTemplate||"",a=z(e,"all")&&e.disableWidthDirections||[],l=!z(e,"all")||(e.allowBorderColor??!0),n=!z(e,"all")||(e.allowBorderRadius??!0),r=e=>B(t,e),o=H({attrNameTemplate:t,attrName:"BorderWidth",disableDirections:a,allowUnitControl:!1}),i=l?{[r("BorderColor")]:{type:"string",default:""}}:{},s=n?H({attrNameTemplate:t,attrName:"BorderRadius"}):{};return{[r("BorderStyle")]:{type:"string",default:""},...i,...o,...s}};ae.defaultProps={attrNameTemplate:"",allowBorderColor:!0,allowBorderRadius:!0};const le=ae,ne=e=>{const t=z(e,"all")&&e.attrNameTemplate||"",a=e=>B(t,e);return{[a("BoxShadowColor")]:{type:"string",default:""},[a("BoxShadowHorizontal")]:{type:"number",default:""},[a("BoxShadowVertical")]:{type:"number",default:""},[a("BoxShadowBlur")]:{type:"number",default:""},[a("BoxShadowSpread")]:{type:"number",default:""},[a("BoxShadowPosition")]:{type:"string",default:""}}};ne.defaultProps={attrNameTemplate:""};const re=ne,oe=e=>{const t=z(e,"all")&&e.excludePanels||[],a=z(e,"all")&&e.includePanels||[];let l=a&&a.length?a:["advanced","motion-effects","background","border","positioning","responsive"];const n=e=>B("",e);t&&t.length&&t.forEach(e=>{l.splice(l.indexOf(e),1)});let r={};const o=G();if(l.includes("advanced")){const e=H({attrName:n("Margin")}),t=H({attrName:n("Padding")});r={...r,...e,...t,[n("zIndex")]:{type:"number",default:""},[n("cssId")]:{type:"string",default:""},[n("cssClasses")]:{type:"string",default:""}}}if(l.includes("motion-effects")&&(r={...r,[n("EntranceAnimation")]:{type:"string",default:""},[n("EntranceAnimationDuration")]:{type:"string",default:"normal"},[n("EntranceAnimationDelay")]:{type:"number",default:""}}),l.includes("background")){const e=Q({attrNameTemplate:"Advanced"});r={...r,...e}}if(l.includes("border")){const e=le({attrNameTemplate:"Advanced"}),t=re({attrNameTemplate:"Advanced"});r={...r,...e,...t}}if(l.includes("positioning")){const e=te({attrName:n("BlockWidth")}),t=X({blockAttributeKey:n("BlockCustomWidth"),allowScreens:!0}),a=X({blockAttributeKey:n("PositionHorizontalOffset"),allowScreens:!0}),l=X({blockAttributeKey:n("PositionVerticalOffset"),allowScreens:!0});r={...r,...e,...t,[n("BlockPosition")]:{type:"string",default:""},[n("PositionHorizontalOrientation")]:{type:"string",default:"left"},...a,[n("PositionVerticalOrientation")]:{type:"string",default:"top"},...l}}return l.includes("responsive")&&(r={...r,...o}),r};oe.defaultProps={excludePanels:[],includePanels:[]};const ie=oe(),se={uniqueClass:{type:"string",default:""},orientation:{type:"string",default:"right"},cardsGalleryRepeater:{type:"array",default:[{itemLink:{},itemImage:{id:"",url:qiBlocksEditor.vars.defaultImage,alt:""}},{itemLink:{},itemImage:{id:"",url:qiBlocksEditor.vars.defaultImage,alt:""}},{itemLink:{},itemImage:{id:"",url:qiBlocksEditor.vars.defaultImage,alt:""}}]},scaleStep:{type:"number",default:.2},offsetStep:{type:"number",default:25},imagesProportion:{type:"string",default:"full"},...ie};var ce=a(5364),ue=a.n(ce);const pe=wp.blockEditor,me=wp.compose,de=wp.element;var be=a(6942),fe=a.n(be);const he=e=>{const t=t=>B(e.attrNameTemplate,e.attrName,t),a=z(e,"all")&&void 0!==e.disableDirections&&e.disableDirections.length>0?e.disableDirections:[],l=z(e,"all")&&void 0!==e.isImportant&&e.isImportant?" !important":"",{blockAttributes:n}=e,r=["Top","Right","Bottom","Left"];let o={},i={},s={};return Object.entries(k).map(([c])=>{const u=O(c),p=t("Unit"+u),m="p"===n[p]?"%":n[p]||"px";[...r].map((p,d)=>{const b=n[t(p+u)],f=n[t(`${p}Decimal`+u)];if(z(b)||z(f)){let t;const n=e.attrName?e.attrName.toLowerCase():"";if(n.includes("border")){if(n.includes("width"))t=`border${p}Width`;else if(n.includes("radius")){let e,a,l;a=d%2?r[d-1]:p,l=d%2?p:r[r.length-d-1],e=`${a}${l}`,t=`border${e}Radius`}}else t=e.attrName?`${n}${p}`:p.toLowerCase();let u="";if(R(m)&&""!==b?u=a.length>0&&a.includes(p)?"":parseInt(b,10)+m:L(m)&&""!==f&&(u=a.length>0&&a.includes(p)?"":parseFloat(f)+m),u)switch(c){case"desktop":o[t]=u+l;break;case"tablet":i[t]=u+l;break;case"mobile":s[t]=u+l}}})}),{desktop:o,tablet:i,mobile:s}};he.defaultProps={attrNameTemplate:"",attrName:"",blockAttributes:{},disableDirections:[],isImportant:!1};const ge=he,ke=e=>{const{blockAttributes:t}=e,a=z(e,"all")&&e.attrNameTemplate||"",l=z(e,"all")&&e.attrName||"Background",n=(e,t)=>B(a,l+e,t);let r={},o={},i={};return t[n("Attachment")]&&(r.backgroundAttachment=t[n("Attachment")]),Object.entries(k).map(([e])=>{let a=O(e),l={};if(t[n("Image",a)]&&t[n("Image",a)].url&&(l.backgroundImage=`url(${t[n("Image",a)].url})`),t[n("Repeat",a)]&&(l.backgroundRepeat=t[n("Repeat",a)]),"custom"===t[n("Position",a)]){let e="",r="";(t[n("XPosition",a)]||t[n("XPositionDecimal",a)])&&(R(t[n("XPositionUnit",a)])&&t[n("XPosition",a)]?e=parseInt(t[n("XPosition",a)],10)+t[n("XPositionUnit",a)]:L(t[n("XPositionUnit",a)])&&t[n("XPositionDecimal",a)]&&(e=parseFloat(t[n("XPositionDecimal",a)])+t[n("XPositionUnit",a)])),(t[n("YPosition",a)]||t[n("YPositionDecimal",a)])&&(R(t[n("YPositionUnit",a)])&&t[n("YPosition",a)]?r=parseInt(t[n("YPosition",a)],10)+t[n("YPositionUnit",a)]:L(t[n("YPositionUnit",a)])&&t[n("YPositionDecimal",a)]&&(r=parseFloat(t[n("YPositionDecimal",a)])+t[n("YPositionUnit",a)])),""===e&&""===r||(l.backgroundPosition=e+" "+r)}else t[n("Position",a)]&&(l.backgroundPosition=t[n("Position",a)]);"custom"===t[n("Size",a)]?(t[n("SizeWidth",a)]||t[n("SizeWidthDecimal",a)])&&(R(t[n("SizeWidthUnit",a)])&&t[n("SizeWidth",a)]?l.backgroundSize=parseInt(t[n("SizeWidth",a)],10)+t[n("SizeWidthUnit",a)]+" auto":L(t[n("SizeWidthUnit",a)])&&t[n("SizeWidthDecimal",a)]&&(l.backgroundSize=parseFloat(t[n("SizeWidthDecimal",a)])+t[n("SizeWidthUnit",a)]+" auto")):t[n("Size",a)]&&(l.backgroundSize=t[n("Size",a)]),Object.keys(l).length>0&&Object.entries(l).map(([t,a])=>{switch(e){case"desktop":r[t]=a;break;case"tablet":o[t]=a;break;case"mobile":i[t]=a}})}),{desktop:r,tablet:o,mobile:i}};ke.defaultProps={attrNameTemplate:"",attrName:"Background",blockAttributes:{}};const _e=ke,ve=e=>{const{blockAttributes:t}=e,a=z(e,"all")&&e.attrNameTemplate||"",l=(e,t)=>B(a,e,t),n=t[l("BackgroundType")]||"";let r={},o={},i={};if("gradient"===n){let e={type:"linear",position:"",color_1:"",location_1:"",color_2:"",location_2:""};t[l("BackgroundGradientColor1")]&&(e.color_1=t[l("BackgroundGradientColor1")]),z(t[l("BackgroundGradientLocation1")])&&(e.location_1=M(t[l("BackgroundGradientLocation1")])+"%"),t[l("BackgroundGradientColor2")]&&(e.color_2=t[l("BackgroundGradientColor2")]),z(t[l("BackgroundGradientLocation2")])&&(e.location_2=M(t[l("BackgroundGradientLocation2")])+"%"),t[l("BackgroundGradientType")]&&(e.type=t[l("BackgroundGradientType")]),"linear"===e.type&&""!==t[l("BackgroundGradientTypeAngle")]?e.position=M(t[l("BackgroundGradientTypeAngle")])+"deg":"radial"===e.type&&t[l("BackgroundGradientTypePosition")]&&(e.position="at "+t[l("BackgroundGradientTypePosition")]),e.type&&e.position&&e.color_1&&e.location_1&&e.color_2&&e.location_2?(r.backgroundColor="transparent",r.backgroundImage=`${e.type}-gradient(${e.position}, ${e.color_1} ${e.location_1}, ${e.color_2} ${e.location_2})`):e.color_1&&(r.backgroundColor=e.color_1)}else"video"===n?!t[l("BackgroundVideoPlayOnMobile")]&&t[l("BackgroundVideoFallbackImage")]&&t[l("BackgroundVideoFallbackImage")].url&&(o.backgroundImage=`url(${t[l("BackgroundVideoFallbackImage")].url})`,o.backgroundPosition="center",o.backgroundSize="cover"):(t[l("BackgroundColor")]&&(r.backgroundColor=t[l("BackgroundColor")]),i=_e({attrNameTemplate:a,blockAttributes:t}));return ue()({desktop:r,tablet:{},mobile:o},i)};ve.defaultProps={attrNameTemplate:"",blockAttributes:{}};const ye=ve,we=e=>{const{blockAttributes:t}=e,a=z(e,"all")&&e.attrNameTemplate||"",l=z(e,"all")&&e.disableWidthDirections||[],n=!z(e,"all")||(e.allowBorderColor??!0),r=(e,t)=>B(a,e,t);let o={},i={};const s=!z(e,"all")||(e.allowBorderRadius??!0)?ge({blockAttributes:t,attrNameTemplate:a,attrName:"BorderRadius",disableDirections:l}):{};return t[r("BorderStyle")]&&(o.borderStyle=t[r("BorderStyle")],n&&t[r("BorderColor")]&&(o.borderColor=t[r("BorderColor")]),i=ge({attrNameTemplate:a,attrName:"BorderWidth",blockAttributes:t})),ue()({desktop:o,tablet:{},mobile:{}},i,s)};we.defaultProps={attrNameTemplate:"",allowBorderColor:!0,allowBorderRadius:!0,blockAttributes:{}};const Ae=we,qe=e=>{const{blockAttributes:t,excludeOptions:a}=e,l=z(e,"all")&&e.attrNameTemplate||"",n=(e,t)=>B(l,e,t);let r={},o={x:0,y:0,blur:0,spread:0,color:"",position:""};var i;return t[n("BoxShadowColor")]&&(o.color=t[n("BoxShadowColor")]),""!==t[n("BoxShadowHorizontal")]&&(o.x=t[n("BoxShadowHorizontal")]),""!==t[n("BoxShadowVertical")]&&(o.y=t[n("BoxShadowVertical")]),""!==t[n("BoxShadowBlur")]&&(o.blur=t[n("BoxShadowBlur")]),""!==t[n("BoxShadowSpread")]&&(o.spread=t[n("BoxShadowSpread")]),i="position",a&&a.length&&a.includes(i)||!t[n("BoxShadowPosition")]||(o.position=t[n("BoxShadowPosition")]),o.color&&(r.boxShadow=o.x+"px "+o.y+"px "+o.blur+"px "+o.spread+"px "+o.color+" "+o.position),{desktop:r,tablet:{},mobile:{}}};qe.defaultProps={attrNameTemplate:"",blockAttributes:{}};const Se=qe,xe=e=>{const{blockAttributes:t}=e,a=(e,t="")=>B("",e,t),l=z(e,"all")&&e.excludePanels||[],n=z(e,"all")&&e.includePanels||[];let r=n&&n.length?n:["advanced","motion-effects","background","border","positioning","responsive"];l&&l.length&&l.forEach(e=>{r.splice(r.indexOf(e),1)});let o={},i={},s={},c={},u={};r.includes("advanced")&&(z(t[a("zIndex")])&&(o.zIndex=M(t[a("zIndex")])),c=ge({attrName:a("Margin"),blockAttributes:t}),u=ge({attrName:a("Padding"),blockAttributes:t})),r.includes("motion-effects")&&void 0!==t[a("EntranceAnimation")]&&""!==t[a("EntranceAnimation")]&&t[a("EntranceAnimationDelay")]&&(o.animationDelay=M(t[a("EntranceAnimationDelay")])+"ms");let p={};r.includes("background")&&(p=ye({attrNameTemplate:"Advanced",blockAttributes:t}));let m={};if(r.includes("border")){const e=Ae({attrNameTemplate:"Advanced",blockAttributes:t}),a=Se({attrNameTemplate:"Advanced",blockAttributes:t});m=ue()(e,a)}if(r.includes("positioning")){z(t[a("BlockPosition")])&&(o.position=t[a("BlockPosition")]);const e=t[a("PositionHorizontalOrientation")],l=t[a("PositionVerticalOrientation")];Object.entries(k).map(([n])=>{let r=O(n),c={};"custom"!==t[a("BlockWidth")]&&"custom"!==t[a("BlockWidth",r)]||!t[a("BlockCustomWidth",r)]&&!t[a("BlockCustomWidthDecimal",r)]||(R(t[a("BlockCustomWidthUnit",r)])&&t[a("BlockCustomWidth",r)]?(c.width=parseInt(t[a("BlockCustomWidth",r)],10)+t[a("BlockCustomWidthUnit",r)],c.maxWidth=parseInt(t[a("BlockCustomWidth",r)],10)+t[a("BlockCustomWidthUnit",r)]):L(t[a("BlockCustomWidthUnit",r)])&&t[a("BlockCustomWidthDecimal",r)]&&(c.width=parseFloat(t[a("BlockCustomWidthDecimal",r)])+t[a("BlockCustomWidthUnit",r)],c.maxWidth=parseFloat(t[a("BlockCustomWidthDecimal",r)])+t[a("BlockCustomWidthUnit",r)])),""===U(t[a("PositionHorizontalOffset",r)])&&""===U(t[a("PositionHorizontalOffsetDecimal",r)])||(R(t[a("PositionHorizontalOffsetUnit",r)])&&""!==U(t[a("PositionHorizontalOffset",r)])?c[e]=parseInt(t[a("PositionHorizontalOffset",r)],10)+t[a("PositionHorizontalOffsetUnit",r)]:L(t[a("PositionHorizontalOffsetUnit",r)])&&""!==U(t[a("PositionHorizontalOffsetDecimal",r)])&&(c[e]=parseFloat(t[a("PositionHorizontalOffsetDecimal",r)])+t[a("PositionHorizontalOffsetUnit",r)])),""===U(t[a("PositionVerticalOffset",r)])&&""===U(t[a("PositionVerticalOffsetDecimal",r)])||(R(t[a("PositionVerticalOffsetUnit",r)])&&""!==U(t[a("PositionVerticalOffset",r)])?c[l]=parseInt(t[a("PositionVerticalOffset",r)],10)+t[a("PositionVerticalOffsetUnit",r)]:L(t[a("PositionVerticalOffsetUnit",r)])&&""!==U(t[a("PositionVerticalOffsetDecimal",r)])&&(c[l]=parseFloat(t[a("PositionVerticalOffsetDecimal",r)])+t[a("PositionVerticalOffsetUnit",r)])),Object.keys(c).length>0&&Object.entries(c).map(([e,t])=>{switch(n){case"desktop":o[e]=t;break;case"tablet":i[e]=t;break;case"mobile":s[e]=t}})})}return o={desktop:o,tablet:i,mobile:s},ue()(o,c,u,p,m)};xe.defaultProps={blockAttributes:{},excludePanels:[],includePanels:[]};const Ee=xe,Ie=e=>{const{unitType:t,unitValue:a,onChangeUnit:l}=e;if(e.units[t])return wp.element.createElement("ul",{className:"qodef-unit-control"},Object.entries(e.units[t]).map(([e,t],n)=>wp.element.createElement("li",{key:n},wp.element.createElement("a",{className:fe()("qodef-unit",{"qodef--selected":("p"===e?"%":e)===a}),onClick:l,"data-unit":"p"===e?"%":e},t))))};Ie.defaultProps={units:{typography:{px:(0,e.__)("px","qi-blocks"),em:(0,e.__)("em","qi-blocks"),rem:(0,e.__)("rem","qi-blocks"),vw:(0,e.__)("vw","qi-blocks")},measure:{px:(0,e.__)("px","qi-blocks"),p:(0,e.__)("%","qi-blocks"),vw:(0,e.__)("vw","qi-blocks"),vh:(0,e.__)("vh","qi-blocks")},space:{px:(0,e.__)("px","qi-blocks"),p:(0,e.__)("%","qi-blocks"),em:(0,e.__)("em","qi-blocks")},height:{px:(0,e.__)("px","qi-blocks"),vw:(0,e.__)("vw","qi-blocks"),vh:(0,e.__)("vh","qi-blocks")},xPosition:{px:(0,e.__)("px","qi-blocks"),em:(0,e.__)("em","qi-blocks"),p:(0,e.__)("%","qi-blocks"),vw:(0,e.__)("vw","qi-blocks")},yPosition:{px:(0,e.__)("px","qi-blocks"),em:(0,e.__)("em","qi-blocks"),p:(0,e.__)("%","qi-blocks"),vh:(0,e.__)("vh","qi-blocks")},pxAndPercent:{px:(0,e.__)("px","qi-blocks"),p:(0,e.__)("%","qi-blocks")},pxAndEm:{px:(0,e.__)("px","qi-blocks"),em:(0,e.__)("em","qi-blocks")},pxEmVw:{px:(0,e.__)("px","qi-blocks"),em:(0,e.__)("em","qi-blocks"),vw:(0,e.__)("vw","qi-blocks")},pxPercentVh:{px:(0,e.__)("px","qi-blocks"),p:(0,e.__)("%","qi-blocks"),vh:(0,e.__)("vh","qi-blocks")},pxPercentVw:{px:(0,e.__)("px","qi-blocks"),p:(0,e.__)("%","qi-blocks"),vw:(0,e.__)("vw","qi-blocks")},pxEmRem:{px:(0,e.__)("px","qi-blocks"),em:(0,e.__)("em","qi-blocks"),rem:(0,e.__)("rem","qi-blocks")}},unitValue:"",onChangeUnit:()=>{}};const Ce=Ie;class Te extends de.Component{constructor(){super(...arguments),this.state={screen:g,isScreenPickerOpen:!1,isMouseOver:!1}}onChangeScreen(e,t){const a=this;a.state.isScreenPickerOpen?(a.props.onChangeScreen(e),a.setState({screen:e,isScreenPickerOpen:!1}),_=e,!t&&a.changePreviewScreen(e),(0,r.doAction)("qi-blocks-action-screen-change",e)):t||a.setState({isScreenPickerOpen:!0}),window.addEventListener("click",e=>{const t=document.querySelectorAll(".qodef-screens-option .qodef-screens.qodef--opened");t.length&&!t[0].contains(e.target)&&a.setState({isScreenPickerOpen:!1})})}onOtherScreenChange(e){this.props.onChangeScreen(e),this.setState({screen:e})}componentDidMount(){const{instanceId:e}=this.props;(0,r.addAction)("qi-blocks-action-screen-change",`qi-blocks/components/screen-control-${e}`,this.onOtherScreenChange.bind(this))}componentWillUnmount(){const{instanceId:e}=this.props;(0,r.removeAction)("qi-blocks-action-screen-change",`qi-blocks/components/screen-control-${e}`)}changeScreenControls(e){v()!==e.previewScreen&&this.onChangeScreen(e.previewScreen,!0)}changePreviewScreen(e){if(e!==this.props.previewScreen){const t=(0,o.dispatch)("core/edit-post")||"",a=(0,o.dispatch)("core/edit-site")||"";let l;if(t){let{__experimentalSetPreviewDeviceType:e}=t;l=e}if(a){const{__experimentalSetPreviewDeviceType:e}=a;l=e}l&&l(P(e))}}render(){const e={...this.props},t={...this.state},{label:a,screens:l,isWidgetsArea:n,previewScreen:r}=e;let o=!1;return(l.length<1||n)&&(o=!0),g!==r&&t.screen!==r&&this.onOtherScreenChange(r),this.changeScreenControls(e),wp.element.createElement("div",{className:"qodef-screens-option"},g!==t.screen&&wp.element.createElement("style",null,"\n\t\t\t\t\t\t\t.qodef-screens-option .qodef-screens.qodef--opened {\n\t\t\t\t\t\t\t\ttop: calc(-4px - 22px * "+Object.keys(l).indexOf(t.screen)+");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t"),a&&wp.element.createElement("label",{className:"qodef-option-label"},a),!o&&wp.element.createElement("ul",{className:"qodef-screens "+(t.isScreenPickerOpen?"qodef--opened":"")},Object.entries(l).map(([e,a],n)=>n===Object.keys(l).indexOf(t.screen)||t.isScreenPickerOpen?wp.element.createElement("li",{className:"qodef-screen-item "+(e===t.screen?"qodef--selected":""),key:n},wp.element.createElement(y.Button,{className:"qodef-screen-item-button",onClick:()=>this.onChangeScreen(e),icon:a.icon,showTooltip:!1,label:a.label,"data-screen":e,onMouseEnter:()=>this.setState({isMouseOver:e}),onMouseLeave:()=>this.setState({isMouseOver:!1})}),e===t.isMouseOver&&wp.element.createElement("div",{className:"qodef-screen-item-tooltip"},a.label)):null)))}}Te.defaultProps={label:"",screens:k,isWidgetsArea:!1,previewScreen:"desktop",onChangeScreen:()=>{}};const Ne=(0,o.withSelect)(e=>{let t="desktop";return e("core/edit-post")&&(t="function"==typeof e("core/editor")?.getDeviceType?e("core/editor")?.getDeviceType()?.toLowerCase():e("core/edit-post").__experimentalGetPreviewDeviceType().toLowerCase()),e("core/edit-site")&&(t="function"==typeof e("core/editor")?.getDeviceType?e("core/editor")?.getDeviceType()?.toLowerCase():e("core/edit-site").__experimentalGetPreviewDeviceType().toLowerCase()),{isWidgetsArea:e("core/edit-widgets")&&!e("core/edit-post"),previewScreen:t}})((0,me.withInstanceId)(Te));class Be extends de.Component{constructor(){super(...arguments),this.state={screen:v(),linkedInputs:!1}}getScreenLabelSuffix(e){const t=e||this.state.screen;return O(t)}getAttributeValue(e,t=""){const{blockAttributes:a,allowScreens:l,repeater:n,repeaterItemIndex:r,repeaterItemKey:o,repeaterGetAttributes:i}=this.props;let s=e;l&&t&&(s=e+t);let c=a[s];return n&&(c=i({key:o,childKey:s},r)),U(c)}setAttributeValue(e,t,a=""){const{setAttributes:l,allowScreens:n,repeater:r,repeaterItemIndex:o,repeaterItemKey:i,repeaterSetAttributes:s}=this.props;let c=e;n&&a&&(c=e+a),r?s({key:i,childKey:c},t,o):l({[c]:t})}render(){const t={...this.props},{label:a,allowScreens:l,rangeMax:n,rangeMin:r,rangeStep:o,rangeDecimalMax:i,rangeDecimalMin:s,rangeDecimalStep:c,repeater:u}=t,p=e=>B(t.attrNameTemplate,t.attrName,e),m=this.getScreenLabelSuffix(),d=p(),b=p("Unit"+m),f=["Top","Right","Bottom","Left"],h=()=>{const e=this.getAttributeValue(b)||"px";return R(e)},g="margin"===t.attrName.toLowerCase()||t.allowNegativeValues?-1*(h()?n:i):h()?r:s;return t.onChange=(e,t)=>{h()?this.setAttributeValue(p(t),M(e),m):this.setAttributeValue(p(`${t}Decimal`),M(e,"decimal"),m)},t.getValue=e=>{let t;return t=h()?""!==this.getAttributeValue(p(e),m)?parseInt(this.getAttributeValue(p(e),m),10):"":""!==this.getAttributeValue(p(`${e}Decimal`),m)?parseFloat(this.getAttributeValue(p(`${e}Decimal`),m)):"",t},t.getPlaceholderValue=e=>{let t="";return"Tablet"===m?t=h()?""!==this.getAttributeValue(p(e))?parseInt(this.getAttributeValue(p(e)),10):"":""!==this.getAttributeValue(p(`${e}Decimal`))?parseFloat(this.getAttributeValue(p(`${e}Decimal`))):"":"Mobile"===m&&(h()?""!==this.getAttributeValue(p(e),"Tablet")?t=parseInt(this.getAttributeValue(p(e),"Tablet"),10):""!==this.getAttributeValue(p(e))&&(t=parseInt(this.getAttributeValue(p(e)),10)):""!==this.getAttributeValue(p(`${e}Decimal`),"Tablet")?t=parseInt(this.getAttributeValue(p(`${e}Decimal`),"Tablet"),10):""!==this.getAttributeValue(p(`${e}Decimal`))&&(t=parseInt(this.getAttributeValue(p(`${e}Decimal`)),10))),t},t.getRangeValue=()=>{let e="";return[...f].some(a=>{t.disableDirections.includes(a)||(e=t.getValue(a))}),e},t.onRangeChange=e=>{[...f].map(a=>{t.disableDirections.length>0&&t.disableDirections.includes(a)?t.onChange("",a):t.onChange(e,a)})},t.onChangeScreen=e=>{this.setState({screen:e})},t.onLinkInputs=e=>{e.preventDefault(),this.state.linkedInputs||[...f].map(e=>{t.disableDirections.length>0&&t.disableDirections.includes(e)?t.onChange("",e):t.onChange(t.getValue("Top"),e)}),this.setState({linkedInputs:!this.state.linkedInputs})},t.onChangeUnit=e=>{e.preventDefault();const t=u?200:0,a=e.target.getAttribute("data-unit"),l=this.getAttributeValue(b)||"px";this.setAttributeValue(b,a),setTimeout(()=>{a!==l&&[...f].map(e=>{const t=d+e,n=`${t}Decimal`;let r=t+m,o=n+m;"px"!==a&&(r=n+m),"px"===l&&(o=t+m,this.setAttributeValue(o,"")),this.setAttributeValue(r,this.getAttributeValue(o))})},t)},wp.element.createElement(y.BaseControl,{className:"qodef-input-control"},wp.element.createElement("div",{className:"qodef-control-heading"},l?wp.element.createElement("div",{className:"qodef-input-control-screens"},wp.element.createElement(Ne,{label:a,onChangeScreen:t.onChangeScreen})):wp.element.createElement("label",{className:"qodef-option-label"},a),t.allowUnitControl&&wp.element.createElement(Ce,{unitType:t.unitType,unitValue:this.getAttributeValue(b),onChangeUnit:t.onChangeUnit}),t.allowLinkedControl&&wp.element.createElement(y.Button,{icon:this.state.linkedInputs?"editor-unlink":"admin-links",onClick:t.onLinkInputs,className:"qodef-link-inputs-button "+(this.state.linkedInputs?"linked":"unlinked")})),this.state.linkedInputs?wp.element.createElement(y.RangeControl,{min:r,max:h()?n:i,step:h()?o:c,onChange:t.onRangeChange,allowReset:!0,value:t.getRangeValue()}):wp.element.createElement("ul",null,[...f].map((a,l)=>wp.element.createElement("li",{className:"qodef-input-control-item",key:l},t.disableDirections.length>0&&t.disableDirections.includes(a)?wp.element.createElement("div",{className:"components-base-control__field"},wp.element.createElement("label",null,(0,e.__)(a,"qi-blocks")),wp.element.createElement("input",{className:"components-text-control__input",type:"text",disabled:!0,value:(0,e.__)("auto","qi-blocks")})):wp.element.createElement(y.TextControl,{type:"number",value:t.getValue(a),placeholder:t.getPlaceholderValue(a),onChange:e=>t.onChange(e,a),label:(0,e.__)(a,"qi-blocks"),min:g,max:h()?n:i,step:h()?o:c})))))}}Be.defaultProps={label:"",attrNameTemplate:"",attrName:"",blockAttributes:{},setAttributes:()=>{},unitType:"space",allowScreens:!0,allowNegativeValues:!1,disableDirections:[],allowUnitControl:!0,allowLinkedControl:!0,rangeMax:600,rangeMin:0,rangeStep:1,rangeDecimalMax:100,rangeDecimalMin:0,rangeDecimalStep:.01,repeater:!1,repeaterItemIndex:0,repeaterItemKey:"",repeaterSetAttributes:()=>{},repeaterGetAttributes:()=>{}};const Pe=Be;class Oe extends de.Component{constructor(){super(...arguments),this.state={screen:v()}}getScreenLabelSuffix(){return O(this.state.screen)}getAttributeValue(e,t=this.getScreenLabelSuffix()){const{blockAttributes:a,repeater:l,repeaterItemIndex:n,repeaterItemKey:r,repeaterGetAttributes:o}=this.props;let i=e;t&&(i=e+t);let s=a[i];return l&&(s=o({key:r,childKey:i},n)),U(s)}setAttributeValue(e,t,a=this.getScreenLabelSuffix()){const{setAttributes:l,setCustomEventOnChange:n,repeater:r,repeaterItemIndex:o,repeaterItemKey:i,repeaterSetAttributes:s}=this.props;let c=e;a&&(c=e+a),r?s({key:i,childKey:c},t,o):l({[c]:t}),n(t)}render(){const e={...this.props},{label:t,blockAttributeKey:a,selectOptions:l}=e;return e.onChangeScreen=e=>{this.setState({screen:e})},wp.element.createElement(y.BaseControl,{className:"qodef-advanced-select-option"},wp.element.createElement("div",{className:"qodef-advanced-select-heading"},wp.element.createElement(Ne,{label:t,onChangeScreen:e.onChangeScreen})),wp.element.createElement(y.SelectControl,{value:this.getAttributeValue(a),options:l,onChange:e=>this.setAttributeValue(a,e)}))}}Oe.defaultProps={label:(0,e.__)("Default Label Text","qi-blocks"),blockAttributes:{},blockAttributeKey:"",setAttributes:()=>{},selectOptions:{},setCustomEventOnChange:()=>{},repeater:!1,repeaterItemIndex:0,repeaterItemKey:"",repeaterSetAttributes:()=>{},repeaterGetAttributes:()=>{}};const De=Oe,Ve=wp.blob,{entries:Re,setPrototypeOf:Le,isFrozen:Me,getPrototypeOf:ze,getOwnPropertyDescriptor:Ue}=Object;let{freeze:Ke,seal:je,create:Fe}=Object,{apply:Ge,construct:$e}="undefined"!=typeof Reflect&&Reflect;Ke||(Ke=function(e){return e}),je||(je=function(e){return e}),Ge||(Ge=function(e,t,a){return e.apply(t,a)}),$e||($e=function(e,t){return new e(...t)});const He=st(Array.prototype.forEach),We=st(Array.prototype.lastIndexOf),Xe=st(Array.prototype.pop),Ye=st(Array.prototype.push),Ze=st(Array.prototype.splice),Je=st(String.prototype.toLowerCase),Qe=st(String.prototype.toString),et=st(String.prototype.match),tt=st(String.prototype.replace),at=st(String.prototype.indexOf),lt=st(String.prototype.trim),nt=st(Object.prototype.hasOwnProperty),rt=st(RegExp.prototype.test),ot=(it=TypeError,function(){for(var e=arguments.length,t=new Array(e),a=0;a<e;a++)t[a]=arguments[a];return $e(it,t)});var it;function st(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var a=arguments.length,l=new Array(a>1?a-1:0),n=1;n<a;n++)l[n-1]=arguments[n];return Ge(e,t,l)}}function ct(e,t){let a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Je;Le&&Le(e,null);let l=t.length;for(;l--;){let n=t[l];if("string"==typeof n){const e=a(n);e!==n&&(Me(t)||(t[l]=e),n=e)}e[n]=!0}return e}function ut(e){for(let t=0;t<e.length;t++){nt(e,t)||(e[t]=null)}return e}function pt(e){const t=Fe(null);for(const[a,l]of Re(e)){nt(e,a)&&(Array.isArray(l)?t[a]=ut(l):l&&"object"==typeof l&&l.constructor===Object?t[a]=pt(l):t[a]=l)}return t}function mt(e,t){for(;null!==e;){const a=Ue(e,t);if(a){if(a.get)return st(a.get);if("function"==typeof a.value)return st(a.value)}e=ze(e)}return function(){return null}}const dt=Ke(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),bt=Ke(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),ft=Ke(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),ht=Ke(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),gt=Ke(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),kt=Ke(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),_t=Ke(["#text"]),vt=Ke(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),yt=Ke(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),wt=Ke(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),At=Ke(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),qt=je(/\{\{[\w\W]*|[\w\W]*\}\}/gm),St=je(/<%[\w\W]*|[\w\W]*%>/gm),xt=je(/\$\{[\w\W]*/gm),Et=je(/^data-[\-\w.\u00B7-\uFFFF]+$/),It=je(/^aria-[\-\w]+$/),Ct=je(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Tt=je(/^(?:\w+script|data):/i),Nt=je(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Bt=je(/^html$/i),Pt=je(/^[a-z][.\w]*(-[.\w]+)+$/i);var Ot=Object.freeze({__proto__:null,ARIA_ATTR:It,ATTR_WHITESPACE:Nt,CUSTOM_ELEMENT:Pt,DATA_ATTR:Et,DOCTYPE_NAME:Bt,ERB_EXPR:St,IS_ALLOWED_URI:Ct,IS_SCRIPT_OR_DATA:Tt,MUSTACHE_EXPR:qt,TMPLIT_EXPR:xt});const Dt=1,Vt=3,Rt=7,Lt=8,Mt=9,zt=function(){return"undefined"==typeof window?null:window};var Ut=function e(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:zt();const a=t=>e(t);if(a.version="3.2.6",a.removed=[],!t||!t.document||t.document.nodeType!==Mt||!t.Element)return a.isSupported=!1,a;let{document:l}=t;const n=l,r=n.currentScript,{DocumentFragment:o,HTMLTemplateElement:i,Node:s,Element:c,NodeFilter:u,NamedNodeMap:p=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:m,DOMParser:d,trustedTypes:b}=t,f=c.prototype,h=mt(f,"cloneNode"),g=mt(f,"remove"),k=mt(f,"nextSibling"),_=mt(f,"childNodes"),v=mt(f,"parentNode");if("function"==typeof i){const e=l.createElement("template");e.content&&e.content.ownerDocument&&(l=e.content.ownerDocument)}let y,w="";const{implementation:A,createNodeIterator:q,createDocumentFragment:S,getElementsByTagName:x}=l,{importNode:E}=n;let I={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};a.isSupported="function"==typeof Re&&"function"==typeof v&&A&&void 0!==A.createHTMLDocument;const{MUSTACHE_EXPR:C,ERB_EXPR:T,TMPLIT_EXPR:N,DATA_ATTR:B,ARIA_ATTR:P,IS_SCRIPT_OR_DATA:O,ATTR_WHITESPACE:D,CUSTOM_ELEMENT:V}=Ot;let{IS_ALLOWED_URI:R}=Ot,L=null;const M=ct({},[...dt,...bt,...ft,...gt,..._t]);let z=null;const U=ct({},[...vt,...yt,...wt,...At]);let K=Object.seal(Fe(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),j=null,F=null,G=!0,$=!0,H=!1,W=!0,X=!1,Y=!0,Z=!1,J=!1,Q=!1,ee=!1,te=!1,ae=!1,le=!0,ne=!1,re=!0,oe=!1,ie={},se=null;const ce=ct({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let ue=null;const pe=ct({},["audio","video","img","source","image","track"]);let me=null;const de=ct({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),be="http://www.w3.org/1998/Math/MathML",fe="http://www.w3.org/2000/svg",he="http://www.w3.org/1999/xhtml";let ge=he,ke=!1,_e=null;const ve=ct({},[be,fe,he],Qe);let ye=ct({},["mi","mo","mn","ms","mtext"]),we=ct({},["annotation-xml"]);const Ae=ct({},["title","style","font","a","script"]);let qe=null;const Se=["application/xhtml+xml","text/html"];let xe=null,Ee=null;const Ie=l.createElement("form"),Ce=function(e){return e instanceof RegExp||e instanceof Function},Te=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!Ee||Ee!==e){if(e&&"object"==typeof e||(e={}),e=pt(e),qe=-1===Se.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE,xe="application/xhtml+xml"===qe?Qe:Je,L=nt(e,"ALLOWED_TAGS")?ct({},e.ALLOWED_TAGS,xe):M,z=nt(e,"ALLOWED_ATTR")?ct({},e.ALLOWED_ATTR,xe):U,_e=nt(e,"ALLOWED_NAMESPACES")?ct({},e.ALLOWED_NAMESPACES,Qe):ve,me=nt(e,"ADD_URI_SAFE_ATTR")?ct(pt(de),e.ADD_URI_SAFE_ATTR,xe):de,ue=nt(e,"ADD_DATA_URI_TAGS")?ct(pt(pe),e.ADD_DATA_URI_TAGS,xe):pe,se=nt(e,"FORBID_CONTENTS")?ct({},e.FORBID_CONTENTS,xe):ce,j=nt(e,"FORBID_TAGS")?ct({},e.FORBID_TAGS,xe):pt({}),F=nt(e,"FORBID_ATTR")?ct({},e.FORBID_ATTR,xe):pt({}),ie=!!nt(e,"USE_PROFILES")&&e.USE_PROFILES,G=!1!==e.ALLOW_ARIA_ATTR,$=!1!==e.ALLOW_DATA_ATTR,H=e.ALLOW_UNKNOWN_PROTOCOLS||!1,W=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,X=e.SAFE_FOR_TEMPLATES||!1,Y=!1!==e.SAFE_FOR_XML,Z=e.WHOLE_DOCUMENT||!1,ee=e.RETURN_DOM||!1,te=e.RETURN_DOM_FRAGMENT||!1,ae=e.RETURN_TRUSTED_TYPE||!1,Q=e.FORCE_BODY||!1,le=!1!==e.SANITIZE_DOM,ne=e.SANITIZE_NAMED_PROPS||!1,re=!1!==e.KEEP_CONTENT,oe=e.IN_PLACE||!1,R=e.ALLOWED_URI_REGEXP||Ct,ge=e.NAMESPACE||he,ye=e.MATHML_TEXT_INTEGRATION_POINTS||ye,we=e.HTML_INTEGRATION_POINTS||we,K=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&Ce(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(K.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&Ce(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(K.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(K.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),X&&($=!1),te&&(ee=!0),ie&&(L=ct({},_t),z=[],!0===ie.html&&(ct(L,dt),ct(z,vt)),!0===ie.svg&&(ct(L,bt),ct(z,yt),ct(z,At)),!0===ie.svgFilters&&(ct(L,ft),ct(z,yt),ct(z,At)),!0===ie.mathMl&&(ct(L,gt),ct(z,wt),ct(z,At))),e.ADD_TAGS&&(L===M&&(L=pt(L)),ct(L,e.ADD_TAGS,xe)),e.ADD_ATTR&&(z===U&&(z=pt(z)),ct(z,e.ADD_ATTR,xe)),e.ADD_URI_SAFE_ATTR&&ct(me,e.ADD_URI_SAFE_ATTR,xe),e.FORBID_CONTENTS&&(se===ce&&(se=pt(se)),ct(se,e.FORBID_CONTENTS,xe)),re&&(L["#text"]=!0),Z&&ct(L,["html","head","body"]),L.table&&(ct(L,["tbody"]),delete j.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw ot('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw ot('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');y=e.TRUSTED_TYPES_POLICY,w=y.createHTML("")}else void 0===y&&(y=function(e,t){if("object"!=typeof e||"function"!=typeof e.createPolicy)return null;let a=null;const l="data-tt-policy-suffix";t&&t.hasAttribute(l)&&(a=t.getAttribute(l));const n="dompurify"+(a?"#"+a:"");try{return e.createPolicy(n,{createHTML:e=>e,createScriptURL:e=>e})}catch(e){return console.warn("TrustedTypes policy "+n+" could not be created."),null}}(b,r)),null!==y&&"string"==typeof w&&(w=y.createHTML(""));Ke&&Ke(e),Ee=e}},Ne=ct({},[...bt,...ft,...ht]),Be=ct({},[...gt,...kt]),Pe=function(e){Ye(a.removed,{element:e});try{v(e).removeChild(e)}catch(t){g(e)}},Oe=function(e,t){try{Ye(a.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){Ye(a.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e)if(ee||te)try{Pe(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},De=function(e){let t=null,a=null;if(Q)e="<remove></remove>"+e;else{const t=et(e,/^[\r\n\t ]+/);a=t&&t[0]}"application/xhtml+xml"===qe&&ge===he&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");const n=y?y.createHTML(e):e;if(ge===he)try{t=(new d).parseFromString(n,qe)}catch(e){}if(!t||!t.documentElement){t=A.createDocument(ge,"template",null);try{t.documentElement.innerHTML=ke?w:n}catch(e){}}const r=t.body||t.documentElement;return e&&a&&r.insertBefore(l.createTextNode(a),r.childNodes[0]||null),ge===he?x.call(t,Z?"html":"body")[0]:Z?t.documentElement:r},Ve=function(e){return q.call(e.ownerDocument||e,e,u.SHOW_ELEMENT|u.SHOW_COMMENT|u.SHOW_TEXT|u.SHOW_PROCESSING_INSTRUCTION|u.SHOW_CDATA_SECTION,null)},Le=function(e){return e instanceof m&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||!(e.attributes instanceof p)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore||"function"!=typeof e.hasChildNodes)},Me=function(e){return"function"==typeof s&&e instanceof s};function ze(e,t,l){He(e,e=>{e.call(a,t,l,Ee)})}const Ue=function(e){let t=null;if(ze(I.beforeSanitizeElements,e,null),Le(e))return Pe(e),!0;const l=xe(e.nodeName);if(ze(I.uponSanitizeElement,e,{tagName:l,allowedTags:L}),Y&&e.hasChildNodes()&&!Me(e.firstElementChild)&&rt(/<[/\w!]/g,e.innerHTML)&&rt(/<[/\w!]/g,e.textContent))return Pe(e),!0;if(e.nodeType===Rt)return Pe(e),!0;if(Y&&e.nodeType===Lt&&rt(/<[/\w]/g,e.data))return Pe(e),!0;if(!L[l]||j[l]){if(!j[l]&&Ge(l)){if(K.tagNameCheck instanceof RegExp&&rt(K.tagNameCheck,l))return!1;if(K.tagNameCheck instanceof Function&&K.tagNameCheck(l))return!1}if(re&&!se[l]){const t=v(e)||e.parentNode,a=_(e)||e.childNodes;if(a&&t){for(let l=a.length-1;l>=0;--l){const n=h(a[l],!0);n.__removalCount=(e.__removalCount||0)+1,t.insertBefore(n,k(e))}}}return Pe(e),!0}return e instanceof c&&!function(e){let t=v(e);t&&t.tagName||(t={namespaceURI:ge,tagName:"template"});const a=Je(e.tagName),l=Je(t.tagName);return!!_e[e.namespaceURI]&&(e.namespaceURI===fe?t.namespaceURI===he?"svg"===a:t.namespaceURI===be?"svg"===a&&("annotation-xml"===l||ye[l]):Boolean(Ne[a]):e.namespaceURI===be?t.namespaceURI===he?"math"===a:t.namespaceURI===fe?"math"===a&&we[l]:Boolean(Be[a]):e.namespaceURI===he?!(t.namespaceURI===fe&&!we[l])&&!(t.namespaceURI===be&&!ye[l])&&!Be[a]&&(Ae[a]||!Ne[a]):!("application/xhtml+xml"!==qe||!_e[e.namespaceURI]))}(e)?(Pe(e),!0):"noscript"!==l&&"noembed"!==l&&"noframes"!==l||!rt(/<\/no(script|embed|frames)/i,e.innerHTML)?(X&&e.nodeType===Vt&&(t=e.textContent,He([C,T,N],e=>{t=tt(t,e," ")}),e.textContent!==t&&(Ye(a.removed,{element:e.cloneNode()}),e.textContent=t)),ze(I.afterSanitizeElements,e,null),!1):(Pe(e),!0)},je=function(e,t,a){if(le&&("id"===t||"name"===t)&&(a in l||a in Ie))return!1;if($&&!F[t]&&rt(B,t));else if(G&&rt(P,t));else if(!z[t]||F[t]){if(!(Ge(e)&&(K.tagNameCheck instanceof RegExp&&rt(K.tagNameCheck,e)||K.tagNameCheck instanceof Function&&K.tagNameCheck(e))&&(K.attributeNameCheck instanceof RegExp&&rt(K.attributeNameCheck,t)||K.attributeNameCheck instanceof Function&&K.attributeNameCheck(t))||"is"===t&&K.allowCustomizedBuiltInElements&&(K.tagNameCheck instanceof RegExp&&rt(K.tagNameCheck,a)||K.tagNameCheck instanceof Function&&K.tagNameCheck(a))))return!1}else if(me[t]);else if(rt(R,tt(a,D,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==at(a,"data:")||!ue[e]){if(H&&!rt(O,tt(a,D,"")));else if(a)return!1}else;return!0},Ge=function(e){return"annotation-xml"!==e&&et(e,V)},$e=function(e){ze(I.beforeSanitizeAttributes,e,null);const{attributes:t}=e;if(!t||Le(e))return;const l={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:z,forceKeepAttr:void 0};let n=t.length;for(;n--;){const r=t[n],{name:o,namespaceURI:i,value:s}=r,c=xe(o),u=s;let p="value"===o?u:lt(u);if(l.attrName=c,l.attrValue=p,l.keepAttr=!0,l.forceKeepAttr=void 0,ze(I.uponSanitizeAttribute,e,l),p=l.attrValue,!ne||"id"!==c&&"name"!==c||(Oe(o,e),p="user-content-"+p),Y&&rt(/((--!?|])>)|<\/(style|title)/i,p)){Oe(o,e);continue}if(l.forceKeepAttr)continue;if(!l.keepAttr){Oe(o,e);continue}if(!W&&rt(/\/>/i,p)){Oe(o,e);continue}X&&He([C,T,N],e=>{p=tt(p,e," ")});const m=xe(e.nodeName);if(je(m,c,p)){if(y&&"object"==typeof b&&"function"==typeof b.getAttributeType)if(i);else switch(b.getAttributeType(m,c)){case"TrustedHTML":p=y.createHTML(p);break;case"TrustedScriptURL":p=y.createScriptURL(p)}if(p!==u)try{i?e.setAttributeNS(i,o,p):e.setAttribute(o,p),Le(e)?Pe(e):Xe(a.removed)}catch(t){Oe(o,e)}}else Oe(o,e)}ze(I.afterSanitizeAttributes,e,null)},it=function e(t){let a=null;const l=Ve(t);for(ze(I.beforeSanitizeShadowDOM,t,null);a=l.nextNode();)ze(I.uponSanitizeShadowNode,a,null),Ue(a),$e(a),a.content instanceof o&&e(a.content);ze(I.afterSanitizeShadowDOM,t,null)};return a.sanitize=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},l=null,r=null,i=null,c=null;if(ke=!e,ke&&(e="\x3c!--\x3e"),"string"!=typeof e&&!Me(e)){if("function"!=typeof e.toString)throw ot("toString is not a function");if("string"!=typeof(e=e.toString()))throw ot("dirty is not a string, aborting")}if(!a.isSupported)return e;if(J||Te(t),a.removed=[],"string"==typeof e&&(oe=!1),oe){if(e.nodeName){const t=xe(e.nodeName);if(!L[t]||j[t])throw ot("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof s)l=De("\x3c!----\x3e"),r=l.ownerDocument.importNode(e,!0),r.nodeType===Dt&&"BODY"===r.nodeName||"HTML"===r.nodeName?l=r:l.appendChild(r);else{if(!ee&&!X&&!Z&&-1===e.indexOf("<"))return y&&ae?y.createHTML(e):e;if(l=De(e),!l)return ee?null:ae?w:""}l&&Q&&Pe(l.firstChild);const u=Ve(oe?e:l);for(;i=u.nextNode();)Ue(i),$e(i),i.content instanceof o&&it(i.content);if(oe)return e;if(ee){if(te)for(c=S.call(l.ownerDocument);l.firstChild;)c.appendChild(l.firstChild);else c=l;return(z.shadowroot||z.shadowrootmode)&&(c=E.call(n,c,!0)),c}let p=Z?l.outerHTML:l.innerHTML;return Z&&L["!doctype"]&&l.ownerDocument&&l.ownerDocument.doctype&&l.ownerDocument.doctype.name&&rt(Bt,l.ownerDocument.doctype.name)&&(p="<!DOCTYPE "+l.ownerDocument.doctype.name+">\n"+p),X&&He([C,T,N],e=>{p=tt(p,e," ")}),y&&ae?y.createHTML(p):p},a.setConfig=function(){Te(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),J=!0},a.clearConfig=function(){Ee=null,J=!1},a.isValidAttribute=function(e,t,a){Ee||Te({});const l=xe(e),n=xe(t);return je(l,n,a)},a.addHook=function(e,t){"function"==typeof t&&Ye(I[e],t)},a.removeHook=function(e,t){if(void 0!==t){const a=We(I[e],t);return-1===a?void 0:Ze(I[e],a,1)[0]}return Xe(I[e])},a.removeHooks=function(e){I[e]=[]},a.removeAllHooks=function(){I={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},a}();class Kt extends de.Component{constructor(){super(...arguments),this.state={screen:v(),imageId:"",externalImageIsSet:!1,imageSizeNotExist:!1}}getScreenLabelSuffix(){return O(this.state.screen)}getAttributeValue(e=this.getScreenLabelSuffix()){const{blockAttributeKey:t,blockAttributes:a,allowScreens:l,repeater:n,repeaterItemIndex:r,repeaterItemKey:o,isSimpleRepeaterValue:i,repeaterGetAttributes:s}=this.props;let c=t;l&&e&&(c=t+e);let u=a[c];if(n){let a=i?null:t;l&&e&&(a=i?this.state.screen:c),u=s({key:o,childKey:a},r)||{}}return U(u)}setAttributeValue(e){const{blockAttributeKey:t,setAttributes:a,allowScreens:l,repeater:n,repeaterItemIndex:r,repeaterItemKey:o,isSimpleRepeaterValue:i,repeaterSetAttributes:s}=this.props,c=this.getScreenLabelSuffix();let u=t;if(l&&c&&(u=t+c),n){let a=i?null:t;l&&c&&(a=i?this.state.screen:u),s({key:o,childKey:a},e,r)}else a({[u]:e})}componentDidMount(){const{allowScreens:e,allowDefaultImage:t}=this.props,{url:a,id:l,defaultValueIsSet:n}=this.getAttributeValue("");if(a&&!a.includes(qiBlocksEditor.vars.siteURL))this.onSelectURL(a),this.setState({externalImageIsSet:!0});else{l&&(this.setState({imageId:l}),this.updateImageSizeOption(l)),!t||n||a||l||(this.setAttributeValue({id:null,url:qiBlocksEditor.vars.defaultImage,alt:qiBlocksEditor.vars.defaultImagePlaceholder,caption:"",width:1200,height:800,custom_image_size:"",html:""}),this.setState({defaultImageIsSet:!0}));const r=[""];e&&(r.push("Tablet"),r.push("Mobile")),r.map(e=>{const{url:t,id:a}=this.getAttributeValue(e);t&&(0,Ve.isBlobURL)(t)&&!a&&this.setAttributeValue({url:"",alt:"",caption:"",width:"",height:"",html:""})})}}setSVGIcon=(e,t,a,l)=>{const n=new XMLHttpRequest;null!=n&&(n.open("GET",t,!0),n.onreadystatechange=()=>{4===n.readyState&&200===n.status&&this.setAttributeValue({id:e,url:t,alt:a,caption:l,html:Ut.sanitize(n.responseText,{USE_PROFILES:{svg:!0,svgFilters:!0}})})},n.send())};onSelectImage=({id:e,url:t,alt:a,caption:l,width:n,height:r})=>{t.includes(".svg")?this.setSVGIcon(e,t,a,l):this.setAttributeValue({id:e,url:t,alt:a,caption:l,width:n,height:r}),this.setState({imageId:e,externalImageIsSet:!1}),this.updateImageSizeOption(e)};updateImageSizeOption=e=>{if(this.props.allowImageSizes){const t=setInterval(()=>{(0,o.select)("core").getMedia(e)&&(clearInterval(t),this.forceUpdate())},1e3)}};onSelectURL=e=>{e.includes(".svg")?this.setSVGIcon(null,e,"",""):this.setAttributeValue({id:null,url:e,alt:"",caption:"",width:"",height:"",html:""}),this.setState({externalImageIsSet:!1})};onUploadError=e=>{const{noticeOperations:t}=this.props;t.createErrorNotice(e)};removeImage=()=>{this.setAttributeValue({id:null,url:"",alt:"",caption:"",width:"",height:"",html:"",defaultValueIsSet:!!this.props.allowDefaultImage})};onImageSizeChange=e=>{const{customImageSizes:t}=this.props,a=(0,o.select)("core").getMedia(this.state.imageId);if(a){let l=e;t&&t.length>1&&(l=this.getImageURLbySize(e)||a.source_url),"custom"===e&&(l=a.source_url),this.setAttributeValue({id:a.id,url:l,alt:a.alt_text||"",caption:a.caption&&a.caption.raw||"",custom_image_size:e})}};getImageURLbySize(e){const t=this.getAttributeValue();let a="";if(t){const l=(0,o.select)("core").getMedia(t.id);if(!l)return"";const n=l.media_details.sizes;if(n&&0===Object.keys(n).length)this.setState({imageSizeNotExist:!0});else{this.setState({imageSizeNotExist:!1});for(const t in n)if(t.includes("qi_blocks_image_size_"+e.replace("-","_"))){a=n[t].source_url;break}}["","custom"].includes(e)&&this.setState({imageSizeNotExist:!1})}return a}getImageSizes(){const{imageSizes:t,customImageSizes:a}=this.props,l=this.getAttributeValue();let n=[];if(l){const r=(0,o.select)("core").getMedia(l.id);if(!r)return[];const i=r.media_details.sizes;if(i&&0===Object.keys(i).length&&n.push({label:(0,e.__)("Default","qi-blocks"),value:""}),a&&a.length>1)a.map(e=>{n.push({label:e.label,value:e.value})});else for(const e in i){const a=i[e],l=t.find(t=>t.slug===e);l&&n.push({label:l.name,value:a.source_url})}}return n}render(){const t={...this.props},a={...this.state},{label:l,help:n,noticeUI:r,allowedTypes:o,allowScreens:i,allowImageSizes:s}=t,c=this.getAttributeValue(),{id:u,url:p,alt:m,html:d}=c;t.onChangeScreen=e=>{this.setState({screen:e}),this.updateImageSizeOption(u)};let b=["qodef-image-option"];return p&&p.includes(".svg")&&b.push("qodef--svg"),wp.element.createElement(y.BaseControl,{className:b.join(" ")},wp.element.createElement("div",{className:"qodef-advanced-select-heading"},i?wp.element.createElement(Ne,{label:l,onChangeScreen:t.onChangeScreen}):wp.element.createElement(wp.element.Fragment,null,l&&wp.element.createElement("label",{className:"qodef-option-label"},l))),n&&wp.element.createElement("p",{className:"qodef-option-description"},n),p?wp.element.createElement(wp.element.Fragment,null,wp.element.createElement("div",{className:"qodef-image-option-inner"},(0,Ve.isBlobURL)(p)&&wp.element.createElement("div",{className:"qodef-image-option-spinner"},wp.element.createElement(y.Spinner,null)),wp.element.createElement(pe.MediaUploadCheck,null,wp.element.createElement(pe.MediaUpload,{allowedTypes:o,value:u,onSelect:this.onSelectImage,render:({open:t})=>wp.element.createElement(wp.element.Fragment,null,wp.element.createElement("img",{src:p,alt:m}),wp.element.createElement("div",{className:"qodef-image-option-actions"},wp.element.createElement(y.Button,{icon:"edit",showTooltip:!0,label:(0,e.__)("Edit Image","qi-blocks"),onClick:t}),wp.element.createElement(y.Button,{icon:"trash",showTooltip:!0,label:(0,e.__)("Remove Image","qi-blocks"),onClick:this.removeImage})))}))),a.imageSizeNotExist&&wp.element.createElement("p",{className:"qodef-image-notice"},(0,e.__)("The Image has no predefined sizes, please set a custom image size.","qi-blocks")),a.externalImageIsSet&&wp.element.createElement("p",{className:"qodef-image-notice"},(0,e.__)("External image URL is set, please upload your image for this Element.","qi-blocks"))):wp.element.createElement(pe.MediaPlaceholder,{allowedTypes:o,icon:"format-image",onSelect:this.onSelectImage,onSelectURL:this.onSelectURL,onError:this.onUploadError,notices:r}),s&&u&&!d&&wp.element.createElement("div",{className:"qodef-image-option-sizes"},wp.element.createElement(y.SelectControl,{label:(0,e.__)("Image Size","qi-blocks"),options:this.getImageSizes(),onChange:this.onImageSizeChange,value:void 0!==c.custom_image_size?c.custom_image_size:p})))}}Kt.defaultProps={label:(0,e.__)("Image","qi-blocks"),help:"",blockAttributeKey:"",blockAttributes:{},setAttributes:()=>{},allowedTypes:["image"],allowScreens:!1,allowDefaultImage:!1,allowImageSizes:!1,customImageSizes:[],repeater:!1,repeaterItemIndex:0,repeaterItemKey:"",isSimpleRepeaterValue:!0,repeaterSetAttributes:()=>{},repeaterGetAttributes:()=>{}};const jt=(0,o.withSelect)(e=>({imageSizes:e("core/block-editor")?.getSettings()?.imageSizes}))((0,y.withNotices)(Kt));class Ft extends de.Component{constructor(){super(...arguments),this.state={isPickerVisible:!1}}getAttributeValue(){const{defaultColor:e,blockAttributeKey:t,blockAttributes:a,repeater:l,repeaterItemIndex:n,repeaterItemKey:r,isSimpleRepeaterValue:o,repeaterGetAttributes:i}=this.props;let s=a[t];return l&&(s=i({key:r,childKey:o?"":t},n)),s||e}setAttributeValue(e){const{blockAttributeKey:t,setAttributes:a,repeater:l,repeaterItemIndex:n,repeaterItemKey:r,isSimpleRepeaterValue:o,repeaterSetAttributes:i}=this.props;l?i({key:r,childKey:o?"":t},e,n):a({[t]:e})}onChange=e=>{const{r:t,g:a,b:l,a:n}=e.rgb;let r="rgba("+[t,a,l,n].join(",")+")";this.props.setHEXValue&&(r=e.hex),this.setState({colorReset:!0}),this.setAttributeValue(r)};onClick=e=>{e.preventDefault();const t=this;t.setState({isPickerVisible:!this.state.isPickerVisible}),window.addEventListener("click",e=>{const a=document.querySelectorAll(".qodef-color-option.qodef--opened");a.length&&a.forEach(a=>{a.contains(e.target)||t.setState({isPickerVisible:!1})})})};onResetColor=e=>{e.preventDefault(),this.setState({isPickerVisible:!this.state.isPickerVisible}),this.setAttributeValue("")};render(){const{label:t,popup:a}=this.props;return wp.element.createElement(y.BaseControl,{className:"qodef-color-option "+(this.state.isPickerVisible?"qodef--opened":"")},wp.element.createElement("div",{className:"qodef-control-heading"},t&&wp.element.createElement("label",{className:"qodef-option-label"},t),wp.element.createElement(y.Button,{onClick:this.onClick,className:"qodef-color-indicator-button"},wp.element.createElement(y.ColorIndicator,{colorValue:this.getAttributeValue(),className:"qodef-color-indicator"}))),this.state.isPickerVisible&&wp.element.createElement("div",{className:`qodef-color-picker-wrapper ${a&&"qodef--popup"}`},wp.element.createElement(y.ColorPicker,{color:this.getAttributeValue(),onChangeComplete:this.onChange,disableAlpha:this.props.setHEXValue}),wp.element.createElement(y.Button,{onClick:this.onResetColor,isSecondary:!0},(0,e.__)("Reset Color","qi-blocks"))))}}Ft.defaultProps={label:(0,e.__)("Color","qi-blocks"),defaultColor:"#000",setHEXValue:!1,blockAttributeKey:"",blockAttributes:{},setAttributes:()=>{},popup:!0,repeater:!1,repeaterItemIndex:0,repeaterItemKey:"",isSimpleRepeaterValue:!1,repeaterSetAttributes:()=>{},repeaterGetAttributes:()=>{}};const Gt=Ft;class $t extends de.Component{getAttributeValue(){const{blockAttributeKey:e,blockAttributes:t,repeater:a,repeaterItemIndex:l,repeaterItemKey:n,repeaterGetAttributes:r}=this.props;let o=t[e];return a&&(o=r({key:n},l)||{}),U(o)}setAttributeValue(e){const{blockAttributeKey:t,setAttributes:a,repeater:l,repeaterItemIndex:n,repeaterItemKey:r,repeaterSetAttributes:o}=this.props;l?o({key:r},e,n):a({[t]:e})}componentDidMount(){const{url:e,id:t}=this.getAttributeValue();e&&(0,Ve.isBlobURL)(e)&&!t&&this.setAttributeValue({url:"",alt:""})}onSelectVideo=({id:e,url:t,alt:a})=>{this.setAttributeValue({id:e,url:t,alt:a})};onSelectURL=e=>{this.setAttributeValue({id:null,url:e,alt:""})};onUploadError=e=>{const{noticeOperations:t}=this.props;t.createErrorNotice(e)};removeVideo=()=>{this.setAttributeValue({id:null,url:"",alt:""})};render(){const t={...this.props},{label:a,description:l,noticeUI:n}=t,{id:r,url:o}=this.getAttributeValue();return wp.element.createElement(y.BaseControl,{className:"qodef-video-option"},a&&wp.element.createElement("label",{className:"qodef-option-label"},a),l&&wp.element.createElement("p",{className:"qodef-option-description"},l),o?wp.element.createElement("div",{className:"qodef-video-option-inner"},(0,Ve.isBlobURL)(o)&&wp.element.createElement("div",{className:"qodef-video-option-spinner"},wp.element.createElement(y.Spinner,null)),wp.element.createElement(pe.MediaUploadCheck,null,wp.element.createElement(pe.MediaUpload,{allowedTypes:["video"],value:r,onSelect:this.onSelectVideo,render:({open:t})=>wp.element.createElement(wp.element.Fragment,null,wp.element.createElement("video",{src:o}),wp.element.createElement("div",{className:"qodef-video-option-actions"},wp.element.createElement(y.Button,{icon:"edit",showTooltip:!0,label:(0,e.__)("Edit Video","qi-blocks"),onClick:t}),wp.element.createElement(y.Button,{icon:"trash",showTooltip:!0,label:(0,e.__)("Remove Video","qi-blocks"),onClick:this.removeVideo})))}))):wp.element.createElement(pe.MediaPlaceholder,{allowedTypes:["video"],icon:"format-video",onSelect:this.onSelectVideo,onSelectURL:this.onSelectURL,onError:this.onUploadError,notices:n}))}}$t.defaultProps={label:(0,e.__)("Video","qi-blocks"),description:"",blockAttributeKey:"",blockAttributes:{},setAttributes:()=>{},repeater:!1,repeaterItemIndex:0,repeaterItemKey:"",repeaterSetAttributes:()=>{},repeaterGetAttributes:()=>{}};const Ht=(0,y.withNotices)($t),Wt=qiBlocksEditor.vars.defaultFontSize,Xt=qiBlocksEditor.vars.defaultLineHeight,Yt=e=>{const{convertorType:t,value:a,attributeKey:l}=e;let n=1;l.includes("FontSize")||l.includes("fontSize")?n=Wt:(l.includes("LineHeight")||l.includes("lineHeight"))&&(n=Xt);const r=e=>Math.round(parseInt(e,10)/n*100)/100,o=e=>Math.round(parseInt(e,10)/n*100)/100,i=e=>Math.round(parseFloat(e)/n*100),s=e=>Math.round(100*parseInt(e,10)/window.innerWidth),c=e=>Math.round(100*parseInt(e,10)/window.innerHeight),u=e=>Math.round(parseFloat(e)*n),p=e=>Math.round(parseFloat(e)*n/100),m=e=>Math.round(window.innerWidth*parseInt(e,10)/100),d=e=>Math.round(window.innerHeight*parseInt(e,10)/100);let b="";if(""!==a&&""!==l&&""!==t)switch(t){case"pxToEm":b=r(a);break;case"pxToRem":b=o(a);break;case"pxToP":b=i(a);break;case"pxToVw":b=s(a);break;case"pxToVh":b=c(a);break;case"emToPx":b=u(a);break;case"emToRem":case"remToRem":case"vwToVh":case"vhToVw":b=a;break;case"emToP":case"remToP":b=(e=>100*parseFloat(e))(a);break;case"emToVw":case"remToVw":b=(e=>s(u(e)))(a);break;case"emToVh":case"remToVh":b=(e=>c(u(e)))(a);break;case"remToPx":b=(e=>Math.round(parseFloat(e)*n))(a);break;case"pToPx":b=p(a);break;case"pToEm":case"pToRem":b=(e=>parseFloat(e)/100)(a);break;case"pToVw":b=(e=>s(p(e)))(a);break;case"pToVh":b=(e=>c(p(e)))(a);break;case"vwToPx":b=m(a);break;case"vwToEm":b=(e=>r(m(e)))(a);break;case"vwToRem":b=(e=>o(m(e)))(a);break;case"vwToP":b=(e=>i(m(e)))(a);break;case"vhToPx":b=d(a);break;case"vhToEm":b=(e=>r(d(e)))(a);break;case"vhToRem":b=(e=>o(d(e)))(a);break;case"vhToP":b=(e=>i(d(e)))(a)}return b};Yt.defaultProps={convertorType:"pxToEm"};const Zt=Yt;class Jt extends de.Component{constructor(){super(...arguments),this.state={screen:v()}}getScreenLabelSuffix(e){const t=e||this.state.screen;return O(t)}getAttributeValue(e,t=""){const{blockAttributes:a,allowScreens:l,repeater:n,repeaterItemIndex:r,repeaterItemKey:o,repeaterGetAttributes:i}=this.props;let s=e;l&&t&&(s=e+t);let c=a[s];return n&&(c=i({key:o,childKey:s},r)),U(c)}setAttributeValue(e,t,a=this.getScreenLabelSuffix()){const{setAttributes:l,allowScreens:n,repeater:r,repeaterItemIndex:o,repeaterItemKey:i,repeaterSetAttributes:s}=this.props;let c=e;n&&a&&(c=e+a),r?s({key:i,childKey:c},t,o):l({[c]:t})}onChangeUnitsValues(e,t,a,l){const n={...this.props},{rangeMax:r,rangeDecimalMax:o,allowUnitsConvertor:i}=n;let s=this.getAttributeValue(t);const c=s;l?(s=parseInt(s,10),s>r&&(s=r)):!l&&s>o&&(s=o),i?["emToRem","remToEm","vwToVh","vhToVw"].includes(a)||(this.setAttributeValue(e,Zt({convertorType:a,value:c,attributeKey:t}),""),this.setAttributeValue(t,"","")):(this.setAttributeValue(e,s,""),this.setAttributeValue(t,"",""))}render(){const e={...this.props},{label:t,unitType:a,blockAttributeKey:l,rangeMax:n,rangeMin:r,rangeStep:o,rangeDecimalMax:i,rangeDecimalMin:s,rangeDecimalStep:c,optionType:u,allowReset:p,allowScreens:m,allowUnits:d,repeater:b,repeaterItemKey:f,isSimpleRepeaterValue:h}=e,g=this.getScreenLabelSuffix();let k=b&&!h?f:l;const _=`${k}Decimal`,v=`${k}Unit`,w=`${k}Tablet`,A=`${_}Tablet`,q=`${v}Tablet`,S=`${k}Mobile`,x=`${_}Mobile`,E=`${v}Mobile`;return e.onChangeScreen=e=>{this.setState({screen:e})},e.onChangeUnit=e=>{e.preventDefault();const t=b?200:0,a=e.target.getAttribute("data-unit"),l=this.getAttributeValue(v,g)||"px";this.setAttributeValue(v,a),setTimeout(()=>{if(a!==l){const e=`${l}To${P(a)}`;let t=k+g,n=_+g;"px"!==a&&(t=_+g,n=k+g),this.onChangeUnitsValues(t,n,e,"px"===a)}},t)},e.onChange=t=>{this.setAttributeValue(k,t),e.setCustomEventOnChange()},e.onChangeDecimal=t=>{let a=0;"decimal"===u&&void 0===t&&(a=200),setTimeout(()=>{this.setAttributeValue(_,t),e.setCustomEventOnChange()},a)},e.getPlaceholderValue=e=>{let t="";const a=this.getAttributeValue(k),l=this.getAttributeValue(_),n=this.getAttributeValue(w),r=this.getAttributeValue(A);return"Tablet"===g?e&&""===n?t=a:e||""!==r||(t=l):"Mobile"===g&&(e&&""===this.getAttributeValue(S)?t=""!==n?n:a:e||""!==this.getAttributeValue(x)||(t=""!==r?r:l)),t},wp.element.createElement(y.BaseControl,{className:"qodef-advanced-range-option"},wp.element.createElement("div",{className:"qodef-advanced-range-heading"},m?wp.element.createElement(Ne,{label:t,onChangeScreen:e.onChangeScreen}):wp.element.createElement("label",{className:"qodef-option-label"},t),d&&wp.element.createElement(Ce,{unitType:a,unitValue:this.getAttributeValue(v,g),onChangeUnit:e.onChangeUnit})),"desktop"===this.state.screen&&wp.element.createElement(wp.element.Fragment,null,(R(this.getAttributeValue(v))&&"decimal"!==u||!d&&"integer"===u)&&wp.element.createElement(y.RangeControl,{min:r,max:n,step:o,value:this.getAttributeValue(k),onChange:e.onChange,allowReset:p}),(L(this.getAttributeValue(v))||!d&&"decimal"===u)&&wp.element.createElement(y.RangeControl,{min:s,max:i,step:c,value:this.getAttributeValue(_),onChange:e.onChangeDecimal,allowReset:p})),"tablet"===this.state.screen&&wp.element.createElement(wp.element.Fragment,null,(R(this.getAttributeValue(q))&&"decimal"!==u||!d&&"integer"===u)&&wp.element.createElement(y.RangeControl,{min:r,max:n,step:o,value:this.getAttributeValue(w),afterIcon:e.getPlaceholderValue(!0),onChange:e.onChange,allowReset:p}),(L(this.getAttributeValue(q))||!d&&"decimal"===u)&&wp.element.createElement(y.RangeControl,{min:s,max:i,step:c,value:this.getAttributeValue(A),afterIcon:e.getPlaceholderValue(!1),onChange:e.onChangeDecimal,allowReset:p})),"mobile"===this.state.screen&&wp.element.createElement(wp.element.Fragment,null,(R(this.getAttributeValue(E))&&"decimal"!==u||!d&&"integer"===u)&&wp.element.createElement(y.RangeControl,{min:r,max:n,step:o,value:this.getAttributeValue(S),afterIcon:e.getPlaceholderValue(!0),onChange:e.onChange,allowReset:p}),(L(this.getAttributeValue(E))||!d&&"decimal"===u)&&wp.element.createElement(y.RangeControl,{min:s,max:i,step:c,value:this.getAttributeValue(x),afterIcon:e.getPlaceholderValue(!1),onChange:e.onChangeDecimal,allowReset:p})))}}Jt.defaultProps={label:(0,e.__)("Default Label Text","qi-blocks"),unitType:"typography",blockAttributes:{},blockAttributeKey:"",setAttributes:()=>{},rangeMax:300,rangeMin:0,rangeStep:1,rangeDecimalMax:10,rangeDecimalMin:0,rangeDecimalStep:.01,optionType:"integer",allowReset:!0,screens:k,allowScreens:!1,allowUnits:!0,allowUnitsConvertor:!1,setCustomEventOnChange:()=>{},repeater:!1,repeaterItemIndex:0,repeaterItemKey:"",isSimpleRepeaterValue:!1,repeaterSetAttributes:()=>{},repeaterGetAttributes:()=>{}};const Qt=Jt,ea=t=>{const a={...t},{attrNameTemplate:l,attrName:n,blockAttributes:r,setAttributes:o,repeater:i,repeaterItemIndex:s,repeaterItemKey:c,repeaterSetAttributes:u,repeaterGetAttributes:p,previewScreen:m}=a,d=n||"Background",b=e=>B(l,d+e);a.getAttributeValue=(e,t="")=>{let a=e;t&&(a=e+t);let l=r[a];return i&&(l=p({key:c,childKey:a},s)),U(l)},a.setAttributeValue=(e,t,a="")=>{let l=e;a&&(l=e+a),i?u({key:c,childKey:l},t,s):o({[l]:t})};let f=O(m||v());return wp.element.createElement(wp.element.Fragment,null,wp.element.createElement(jt,{label:(0,e.__)(`${d} Image`,"qi-blocks"),blockAttributeKey:b("Image"),blockAttributes:r,setAttributes:o,allowScreens:!0,repeater:i,repeaterItemIndex:s,repeaterItemKey:c,isSimpleRepeaterValue:!1,repeaterSetAttributes:u,repeaterGetAttributes:p}),a.getAttributeValue(b("Image"))&&a.getAttributeValue(b("Image")).url&&wp.element.createElement(wp.element.Fragment,null,wp.element.createElement(De,{label:(0,e.__)(`${d} Position`,"qi-blocks"),blockAttributeKey:b("Position"),blockAttributes:r,setAttributes:o,selectOptions:K("background_position",!0,[{value:"custom",label:(0,e.__)("Custom","qi-blocks")}]),repeater:i,repeaterItemIndex:s,repeaterItemKey:c,repeaterSetAttributes:u,repeaterGetAttributes:p}),(""===f&&"custom"===a.getAttributeValue(b("Position"))||""!==f&&"custom"===a.getAttributeValue(b("Position"),f)||""!==f&&"custom"===a.getAttributeValue(b("Position"))&&["","custom"].includes(a.getAttributeValue(b("Position"),"Tablet"))&&""===a.getAttributeValue(b("Position"),f))&&wp.element.createElement(wp.element.Fragment,null,wp.element.createElement(Qt,{label:(0,e.__)("X Position","qi-blocks"),blockAttributeKey:b("XPosition"),setAttributes:o,blockAttributes:r,rangeMax:800,rangeMin:-800,rangeDecimalMax:100,rangeDecimalMin:-100,unitType:"xPosition",allowScreens:!0,repeater:i,repeaterItemIndex:s,repeaterItemKey:c,repeaterSetAttributes:u,repeaterGetAttributes:p}),wp.element.createElement(Qt,{label:(0,e.__)("Y Position","qi-blocks"),blockAttributeKey:b("YPosition"),setAttributes:o,blockAttributes:r,rangeMax:800,rangeMin:-800,rangeDecimalMax:100,rangeDecimalMin:-100,unitType:"yPosition",allowScreens:!0,repeater:i,repeaterItemIndex:s,repeaterItemKey:c,repeaterSetAttributes:u,repeaterGetAttributes:p})),wp.element.createElement(y.SelectControl,{label:(0,e.__)(`${d} Attachment`,"qi-blocks"),value:a.getAttributeValue(b("Attachment")),options:K("background_attachment")||"",onChange:e=>a.setAttributeValue(b("Attachment"),e)}),wp.element.createElement(De,{label:(0,e.__)(`${d} Repeat`,"qi-blocks"),blockAttributeKey:b("Repeat"),blockAttributes:r,setAttributes:o,selectOptions:K("background_repeat"),repeater:i,repeaterItemIndex:s,repeaterItemKey:c,repeaterSetAttributes:u,repeaterGetAttributes:p}),wp.element.createElement(De,{label:(0,e.__)(`${d} Size`,"qi-blocks"),blockAttributeKey:b("Size"),blockAttributes:r,setAttributes:o,selectOptions:K("background_size",!0,[{value:"custom",label:(0,e.__)("Custom","qi-blocks")}]),repeater:i,repeaterItemIndex:s,repeaterItemKey:c,repeaterSetAttributes:u,repeaterGetAttributes:p}),"custom"===a.getAttributeValue(b("Size"),f)&&wp.element.createElement(wp.element.Fragment,null,wp.element.createElement(Qt,{label:(0,e.__)("Custom Width","qi-blocks"),blockAttributeKey:b("SizeWidth"),setAttributes:o,blockAttributes:r,rangeMax:1e3,rangeMin:0,rangeDecimalMax:100,rangeDecimalMin:0,unitType:"xPosition",allowScreens:!0,repeater:i,repeaterItemIndex:s,repeaterItemKey:c,repeaterSetAttributes:u,repeaterGetAttributes:p}))))};ea.defaultProps={attrNameTemplate:"",attrName:"Background",blockAttributes:{},setAttributes:()=>{},repeater:!1,repeaterItemIndex:0,repeaterItemKey:"",repeaterSetAttributes:()=>{},repeaterGetAttributes:()=>{},previewScreen:""};const ta=ea,aa=t=>{const a={...t},{attrNameTemplate:l,blockAttributes:n,setAttributes:r,includeVideoBG:o,repeater:i,repeaterItemIndex:s,repeaterItemKey:c,repeaterSetAttributes:u,repeaterGetAttributes:p,previewScreen:m}=a,d=e=>B(l,e);a.getAttributeValue=(e,t="")=>{let a=n[e];if(i){let l=e;t&&(l=e+t),a=p({key:c,childKey:l},s)}return U(a)},a.setAttributeValue=(e,t,a="")=>{if(i){let l=e;a&&(l=e+a),u({key:c,childKey:l},t,s)}else r({[e+a]:t})};const b=[{label:(0,e.__)("Classic","qi-blocks"),value:""},{label:(0,e.__)("Gradient","qi-blocks"),value:"gradient"}];return o&&b.push({label:(0,e.__)("Video","qi-blocks"),value:"video"}),wp.element.createElement("div",{className:"qodef-background-panel"},wp.element.createElement(y.SelectControl,{label:(0,e.__)("Background Type","qi-blocks"),value:a.getAttributeValue(d("BackgroundType")),options:b,onChange:e=>a.setAttributeValue(d("BackgroundType"),e)}),""===a.getAttributeValue(d("BackgroundType"))&&wp.element.createElement(wp.element.Fragment,null,wp.element.createElement(Gt,{label:(0,e.__)("Background Color","qi-blocks"),blockAttributeKey:d("BackgroundColor"),blockAttributes:n,setAttributes:r,repeater:i,repeaterItemIndex:s,repeaterItemKey:c,repeaterSetAttributes:u,repeaterGetAttributes:p}),wp.element.createElement(ta,{attrNameTemplate:l,blockAttributes:n,setAttributes:r,repeater:i,repeaterItemIndex:s,repeaterItemKey:c,repeaterSetAttributes:u,repeaterGetAttributes:p,previewScreen:m})),"gradient"===a.getAttributeValue(d("BackgroundType"))&&wp.element.createElement(wp.element.Fragment,null,wp.element.createElement(Gt,{label:(0,e.__)("First Color","qi-blocks"),blockAttributeKey:d("BackgroundGradientColor1"),blockAttributes:n,setAttributes:r,repeater:i,repeaterItemIndex:s,repeaterItemKey:c,repeaterSetAttributes:u,repeaterGetAttributes:p}),wp.element.createElement(y.RangeControl,{label:(0,e.__)("Location","qi-blocks"),value:a.getAttributeValue(d("BackgroundGradientLocation1")),onChange:e=>a.setAttributeValue(d("BackgroundGradientLocation1"),e),min:0,max:100,step:1}),wp.element.createElement(Gt,{label:(0,e.__)("Second Color","qi-blocks"),blockAttributeKey:d("BackgroundGradientColor2"),blockAttributes:n,setAttributes:r,repeater:i,repeaterItemIndex:s,repeaterItemKey:c,repeaterSetAttributes:u,repeaterGetAttributes:p}),wp.element.createElement(y.RangeControl,{label:(0,e.__)("Location","qi-blocks"),value:a.getAttributeValue(d("BackgroundGradientLocation2")),onChange:e=>a.setAttributeValue(d("BackgroundGradientLocation2"),e),min:0,max:100,step:1}),wp.element.createElement(y.SelectControl,{label:(0,e.__)("Gradient Type","qi-blocks"),value:a.getAttributeValue(d("BackgroundGradientType")),options:[{label:(0,e.__)("Linear","qi-blocks"),value:"linear"},{label:(0,e.__)("Radial","qi-blocks"),value:"radial"}],onChange:e=>a.setAttributeValue(d("BackgroundGradientType"),e)}),"linear"===a.getAttributeValue(d("BackgroundGradientType"))&&wp.element.createElement(y.RangeControl,{label:(0,e.__)("Angle","qi-blocks"),value:a.getAttributeValue(d("BackgroundGradientTypeAngle")),onChange:e=>a.setAttributeValue(d("BackgroundGradientTypeAngle"),e),min:0,max:360,step:1}),"radial"===a.getAttributeValue(d("BackgroundGradientType"))&&wp.element.createElement(y.SelectControl,{label:(0,e.__)("Position","qi-blocks"),value:a.getAttributeValue(d("BackgroundGradientTypePosition")),options:K("background_position",!1),onChange:e=>a.setAttributeValue(d("BackgroundGradientTypePosition"),e)})),"video"===a.getAttributeValue(d("BackgroundType"))&&wp.element.createElement(wp.element.Fragment,null,wp.element.createElement(Ht,{label:(0,e.__)("Video Link","qi-blocks"),description:(0,e.__)("Self hosted video file (mp4 is recommended)","qi-blocks"),blockAttributeKey:d("BackgroundVideoLink"),blockAttributes:n,setAttributes:r,repeater:i,repeaterItemIndex:s,repeaterItemKey:c,repeaterSetAttributes:u,repeaterGetAttributes:p}),wp.element.createElement(y.TextControl,{type:"number",label:(0,e.__)("Start Time","qi-blocks"),help:(0,e.__)("Specify a start time (in seconds)","qi-blocks"),value:a.getAttributeValue(d("BackgroundVideoStartTime")),onChange:e=>a.setAttributeValue(d("BackgroundVideoStartTime"),M(e))}),wp.element.createElement(y.TextControl,{type:"number",label:(0,e.__)("End Time","qi-blocks"),help:(0,e.__)("Specify an end time (in seconds)","qi-blocks"),value:a.getAttributeValue(d("BackgroundVideoEndTime")),onChange:e=>a.setAttributeValue(d("BackgroundVideoEndTime"),M(e))}),wp.element.createElement(A,{label:(0,e.__)("Play Once","qi-blocks"),blockAttributeKey:d("BackgroundVideoPlayOnce"),blockAttributes:n,setAttributes:r,repeater:i,repeaterItemIndex:s,repeaterItemKey:c,repeaterSetAttributes:u,repeaterGetAttributes:p}),wp.element.createElement(A,{label:(0,e.__)("Play On Mobile","qi-blocks"),blockAttributeKey:d("BackgroundVideoPlayOnMobile"),blockAttributes:n,setAttributes:r,repeater:i,repeaterItemIndex:s,repeaterItemKey:c,repeaterSetAttributes:u,repeaterGetAttributes:p}),wp.element.createElement(jt,{label:(0,e.__)("Background Fallback","qi-blocks"),blockAttributeKey:d("BackgroundVideoFallbackImage"),blockAttributes:n,setAttributes:r,repeater:i,repeaterItemIndex:s,repeaterItemKey:c,repeaterSetAttributes:u,repeaterGetAttributes:p})))};aa.defaultProps={attrNameTemplate:"",blockAttributes:{},setAttributes:()=>{},includeVideoBG:!1,repeater:!1,repeaterItemIndex:0,repeaterItemKey:"",repeaterSetAttributes:()=>{},repeaterGetAttributes:()=>{},previewScreen:""};const la=aa,na=t=>{const a={...t},{attrNameTemplate:l,blockAttributes:n,setAttributes:r,disableWidthDirections:o,repeater:i,repeaterItemIndex:s,repeaterItemKey:c,repeaterSetAttributes:u,repeaterGetAttributes:p}=a,m=e=>B(l,e);return a.getAttributeValue=(e,t="")=>{let a=n[e];if(i){let l=e;t&&(l=e+t),a=p({key:c,childKey:l},s)}return U(a)},a.setAttributeValue=(e,t,a="")=>{if(i){let l=e;a&&(l=e+a),u({key:c,childKey:l},t,s)}else r({[e+a]:t})},wp.element.createElement("div",{className:"qodef-border-panel"},wp.element.createElement(y.SelectControl,{label:(0,e.__)("Border Type","qi-blocks"),value:a.getAttributeValue(m("BorderStyle")),options:[{label:(0,e.__)("Default","qi-blocks"),value:""},{label:(0,e.__)("None","qi-blocks"),value:"none"},{label:(0,e.__)("Double","qi-blocks"),value:"double"},{label:(0,e.__)("Groove","qi-blocks"),value:"groove"},...K("border_style",!1)],onChange:e=>a.setAttributeValue(m("BorderStyle"),e)}),!["","none"].includes(n[m("BorderStyle")])&&wp.element.createElement(wp.element.Fragment,null,wp.element.createElement(Pe,{label:(0,e.__)("Border Width","qi-blocks"),attrName:m("BorderWidth"),blockAttributes:n,setAttributes:r,allowUnitControl:!1,disableDirections:o,rangeMax:20,repeater:i,repeaterItemIndex:s,repeaterItemKey:c,repeaterSetAttributes:u,repeaterGetAttributes:p}),(a.allowBorderColor??!0)&&wp.element.createElement(Gt,{label:(0,e.__)("Border Color","qi-blocks"),blockAttributeKey:m("BorderColor"),blockAttributes:n,setAttributes:r,repeater:i,repeaterItemIndex:s,repeaterItemKey:c,repeaterSetAttributes:u,repeaterGetAttributes:p})),(a.allowBorderRadius??!0)&&wp.element.createElement(Pe,{label:(0,e.__)("Border Radius","qi-blocks"),attrName:m("BorderRadius"),blockAttributes:n,setAttributes:r,unitType:"pxAndPercent",repeater:i,repeaterItemIndex:s,repeaterItemKey:c,repeaterSetAttributes:u,repeaterGetAttributes:p}))};na.defaultProps={attrNameTemplate:"",blockAttributes:{},setAttributes:()=>{},allowBorderColor:!0,allowBorderRadius:!0,disableWidthDirections:[],repeater:!1,repeaterItemIndex:0,repeaterItemKey:"",repeaterSetAttributes:()=>{},repeaterGetAttributes:()=>{}};const ra=na,oa=t=>{const a={...t},{attrNameTemplate:l,blockAttributes:n,setAttributes:r,excludeOptions:o}=a,i=e=>B(l,e),[s,c]=(0,de.useState)(!1);let u=["qodef-box-shadow-panel"];return a.popup&&u.push("qodef--has-popup"),s&&u.push("qodef--opened"),a.onClick=()=>{c(e=>!e),window.addEventListener("click",e=>{const t=document.querySelectorAll(".qodef-box-shadow-panel.qodef--opened");t.length&&t.forEach(t=>{t.contains(e.target)||c(!1)})})},wp.element.createElement("div",{className:u.join(" ")},wp.element.createElement("div",{className:"qodef-box-shadow-panel-heading"},a.label&&wp.element.createElement("label",{className:"qodef-option-label"},a.label),a.popup&&wp.element.createElement(y.Button,{icon:"edit",showTooltip:!0,label:(0,e.__)("Open Panel","qi-blocks"),onClick:a.onClick})),wp.element.createElement("div",{className:"qodef-box-shadow-panel-content"},wp.element.createElement(Gt,{label:(0,e.__)("Color","qi-blocks"),blockAttributeKey:i("BoxShadowColor"),blockAttributes:n,setAttributes:r,popup:!1}),wp.element.createElement(y.RangeControl,{label:(0,e.__)("Horizontal","qi-blocks"),value:n[i("BoxShadowHorizontal")],onChange:e=>r({[i("BoxShadowHorizontal")]:e}),min:-100,max:100,step:1,allowReset:!0}),wp.element.createElement(y.RangeControl,{label:(0,e.__)("Vertical","qi-blocks"),value:n[i("BoxShadowVertical")],onChange:e=>r({[i("BoxShadowVertical")]:e}),min:-100,max:100,step:1,allowReset:!0}),wp.element.createElement(y.RangeControl,{label:(0,e.__)("Blur","qi-blocks"),value:n[i("BoxShadowBlur")],onChange:e=>r({[i("BoxShadowBlur")]:e}),min:0,max:100,step:1,allowReset:!0}),wp.element.createElement(y.RangeControl,{label:(0,e.__)("Spread","qi-blocks"),value:n[i("BoxShadowSpread")],onChange:e=>r({[i("BoxShadowSpread")]:e}),min:-100,max:100,step:1,allowReset:!0}),(p="position",!(o&&o.length&&o.includes(p))&&wp.element.createElement(y.SelectControl,{label:(0,e.__)("Position","qi-blocks"),value:n[i("BoxShadowPosition")],options:[{label:(0,e.__)("Outline","qi-blocks"),value:""},{label:(0,e.__)("Inset","qi-blocks"),value:"inset"}],onChange:e=>r({[i("BoxShadowPosition")]:e})}))));var p};oa.defaultProps={label:(0,e.__)("Box Shadow","qi-blocks"),attrNameTemplate:"",blockAttributes:{},setAttributes:()=>{},excludeOptions:[],popup:!1};const ia=oa;class sa extends de.Component{render(){const{blockAttributes:t,setAttributes:a,excludePanels:l,previewScreen:n,blockName:r}=this.props,o=(e,t="")=>B("",e,t),i=["advanced","motion-effects","background","border","positioning","responsive"];l&&l.length&&l.forEach(e=>{i.splice(i.indexOf(e),1)});let s=O(n);return wp.element.createElement("div",{className:"qodef-advanced-panel"},i.includes("advanced")&&wp.element.createElement(y.PanelBody,{title:(0,e.__)("Advanced","qi-blocks")},wp.element.createElement(Pe,{label:(0,e.__)("Margin","qi-blocks"),attrName:o("Margin"),blockAttributes:t,setAttributes:a}),wp.element.createElement(Pe,{label:(0,e.__)("Padding","qi-blocks"),attrName:o("Padding"),blockAttributes:t,setAttributes:a}),wp.element.createElement(y.TextControl,{type:"number",label:(0,e.__)("Z-Index","qi-blocks"),value:t[o("zIndex")],onChange:e=>a({[o("zIndex")]:M(e)})}),wp.element.createElement(y.TextControl,{label:(0,e.__)("CSS ID","qi-blocks"),value:t[o("cssId")],onChange:e=>a({[o("cssId")]:e})}),wp.element.createElement(y.TextControl,{label:(0,e.__)("CSS Classes","qi-blocks"),value:t[o("cssClasses")],onChange:e=>a({[o("cssClasses")]:e})})),i.includes("motion-effects")&&wp.element.createElement(y.PanelBody,{title:(0,e.__)("Motion Effects","qi-blocks"),initialOpen:!1},wp.element.createElement(y.SelectControl,{label:(0,e.__)("Entrance Animation","qi-blocks"),value:t[o("EntranceAnimation")],options:[{label:(0,e.__)("None","qi-blocks"),value:""},{label:(0,e.__)("Back In Down","qi-blocks"),value:"backInDown"},{label:(0,e.__)("Back In Left","qi-blocks"),value:"backInLeft"},{label:(0,e.__)("Back In Right","qi-blocks"),value:"backInRight"},{label:(0,e.__)("Back In Up","qi-blocks"),value:"backInUp"},{label:(0,e.__)("Bounce","qi-blocks"),value:"bounce"},{label:(0,e.__)("Bounce In","qi-blocks"),value:"bounceIn"},{label:(0,e.__)("Bounce In Down","qi-blocks"),value:"bounceInDown"},{label:(0,e.__)("Bounce In Left","qi-blocks"),value:"bounceInLeft"},{label:(0,e.__)("Bounce In Right","qi-blocks"),value:"bounceInRight"},{label:(0,e.__)("Bounce In Up","qi-blocks"),value:"bounceInUp"},{label:(0,e.__)("Fade In","qi-blocks"),value:"fadeIn"},{label:(0,e.__)("Fade In Down","qi-blocks"),value:"fadeInDown"},{label:(0,e.__)("Fade In Down Big","qi-blocks"),value:"fadeInDownBig"},{label:(0,e.__)("Fade In Left","qi-blocks"),value:"fadeInLeft"},{label:(0,e.__)("Fade In Left Big","qi-blocks"),value:"fadeInLeftBig"},{label:(0,e.__)("Fade In Right","qi-blocks"),value:"fadeInRight"},{label:(0,e.__)("Fade In Right Big","qi-blocks"),value:"fadeInRightBig"},{label:(0,e.__)("Fade In Up","qi-blocks"),value:"fadeInUp"},{label:(0,e.__)("Fade In Up Big","qi-blocks"),value:"fadeInUpBig"},{label:(0,e.__)("Fade In Top Left","qi-blocks"),value:"fadeInTopLeft"},{label:(0,e.__)("Fade In Top Right","qi-blocks"),value:"fadeInTopRight"},{label:(0,e.__)("Fade In Bottom Left","qi-blocks"),value:"fadeInBottomLeft"},{label:(0,e.__)("Fade In Bottom Right","qi-blocks"),value:"fadeInBottomRight"},{label:(0,e.__)("Flash","qi-blocks"),value:"flash"},{label:(0,e.__)("Flip","qi-blocks"),value:"flip"},{label:(0,e.__)("Flip In X","qi-blocks"),value:"flipInX"},{label:(0,e.__)("Flip In Y","qi-blocks"),value:"flipInY"},{label:(0,e.__)("Head Shake","qi-blocks"),value:"headShake"},{label:(0,e.__)("Heart Beat","qi-blocks"),value:"heartBeat"},{label:(0,e.__)("Jack In The Box","qi-blocks"),value:"jackInTheBox"},{label:(0,e.__)("Jello","qi-blocks"),value:"jello"},{label:(0,e.__)("Light Speed In Right","qi-blocks"),value:"lightSpeedInRight"},{label:(0,e.__)("Light Speed In Left","qi-blocks"),value:"lightSpeedInLeft"},{label:(0,e.__)("Pulse","qi-blocks"),value:"pulse"},{label:(0,e.__)("Roll In","qi-blocks"),value:"rollIn"},{label:(0,e.__)("Rotate In","qi-blocks"),value:"rotateIn"},{label:(0,e.__)("Rotate In Down Left","qi-blocks"),value:"rotateInDownLeft"},{label:(0,e.__)("Rotate In Down Right","qi-blocks"),value:"rotateInDownRight"},{label:(0,e.__)("Rotate In Up Left","qi-blocks"),value:"rotateInUpLeft"},{label:(0,e.__)("Rotate In Up Right","qi-blocks"),value:"rotateInUpRight"},{label:(0,e.__)("Rubber Band","qi-blocks"),value:"rubberBand"},{label:(0,e.__)("Shake X","qi-blocks"),value:"shakeX"},{label:(0,e.__)("Shake Y","qi-blocks"),value:"shakeY"},{label:(0,e.__)("Slide In Down","qi-blocks"),value:"slideInDown"},{label:(0,e.__)("Slide In Left","qi-blocks"),value:"slideInLeft"},{label:(0,e.__)("Slide In Right","qi-blocks"),value:"slideInRight"},{label:(0,e.__)("Slide In Up","qi-blocks"),value:"slideInUp"},{label:(0,e.__)("Swing","qi-blocks"),value:"swing"},{label:(0,e.__)("Tada","qi-blocks"),value:"tada"},{label:(0,e.__)("Wobble","qi-blocks"),value:"wobble"},{label:(0,e.__)("Zoom In","qi-blocks"),value:"zoomIn"},{label:(0,e.__)("Zoom In Down","qi-blocks"),value:"zoomInDown"},{label:(0,e.__)("Zoom In Left","qi-blocks"),value:"zoomInLeft"},{label:(0,e.__)("Zoom In Right","qi-blocks"),value:"zoomInRight"},{label:(0,e.__)("Zoom In Up","qi-blocks"),value:"zoomInUp"}],onChange:e=>{a({[o("EntranceAnimation")]:e}),setTimeout(()=>{qiBlocksEditor.qodefTriggerBlockAnimation.triggerAnimation(t.uniqueClass)},300)}}),void 0!==t[o("EntranceAnimation")]&&""!==t[o("EntranceAnimation")]&&wp.element.createElement(wp.element.Fragment,null,wp.element.createElement(y.SelectControl,{label:(0,e.__)("Animation Duration","qi-blocks"),value:t[o("EntranceAnimationDuration")],options:[{label:(0,e.__)("Slower","qi-blocks"),value:"slower"},{label:(0,e.__)("Slow","qi-blocks"),value:"slow"},{label:(0,e.__)("Normal","qi-blocks"),value:"normal"},{label:(0,e.__)("Fast","qi-blocks"),value:"fast"},{label:(0,e.__)("Faster","qi-blocks"),value:"faster"}],onChange:e=>{a({[o("EntranceAnimationDuration")]:e}),setTimeout(()=>{qiBlocksEditor.qodefTriggerBlockAnimation.triggerAnimation(t.uniqueClass)},300)}}),wp.element.createElement(y.TextControl,{type:"number",label:(0,e.__)("Animation Delay (ms)","qi-blocks"),value:t[o("EntranceAnimationDelay")],min:0,step:100,onChange:e=>{a({[o("EntranceAnimationDelay")]:M(e)}),qiBlocksEditor.qodefTriggerBlockAnimation.triggerAnimation(t.uniqueClass,!0)}}))),i.includes("background")&&wp.element.createElement(y.PanelBody,{title:(0,e.__)("Background","qi-blocks"),initialOpen:!1},wp.element.createElement(la,{attrNameTemplate:"Advanced",blockAttributes:t,setAttributes:a,previewScreen:n})),i.includes("border")&&wp.element.createElement(y.PanelBody,{title:(0,e.__)("Border","qi-blocks"),initialOpen:!1},wp.element.createElement(ra,{attrNameTemplate:"Advanced",blockAttributes:t,setAttributes:a}),wp.element.createElement(ia,{attrNameTemplate:"Advanced",blockAttributes:t,setAttributes:a,popup:!0})),i.includes("positioning")&&wp.element.createElement(y.PanelBody,{title:(0,e.__)("Positioning","qi-blocks"),initialOpen:!1},wp.element.createElement(De,{label:(0,e.__)("Width","qi-blocks"),blockAttributeKey:o("BlockWidth"),blockAttributes:t,setAttributes:a,selectOptions:[{label:(0,e.__)("Default","qi-blocks"),value:""},{label:(0,e.__)("Full Width (100%)","qi-blocks"),value:"full-width"},{label:(0,e.__)("Inline (auto)","qi-blocks"),value:"inline"},{label:(0,e.__)("Custom","qi-blocks"),value:"custom"}]}),(""===s&&"custom"===t[o("BlockWidth")]||""!==s&&"custom"===t[o("BlockWidth",s)]||""!==s&&"custom"===t[o("BlockWidth")]&&["","custom"].includes(t[o("BlockWidth","Tablet")])&&""===t[o("BlockWidth",s)])&&wp.element.createElement(Qt,{label:(0,e.__)("Custom Width","qi-blocks"),blockAttributeKey:o("BlockCustomWidth"),setAttributes:a,blockAttributes:t,rangeMax:1e3,rangeDecimalMax:100,unitType:"pxPercentVw",allowScreens:!0}),wp.element.createElement(y.SelectControl,{label:(0,e.__)("Position","qi-blocks"),value:t[o("BlockPosition")],options:[{label:(0,e.__)("Default","qi-blocks"),value:""},{label:(0,e.__)("Absolute","qi-blocks"),value:"absolute"},{label:(0,e.__)("Relative","qi-blocks"),value:"relative"},{label:(0,e.__)("Fixed","qi-blocks"),value:"fixed"}],onChange:e=>{a({[o("BlockPosition")]:e})}}),""!==t[o("BlockPosition")]&&wp.element.createElement(wp.element.Fragment,null,wp.element.createElement(y.SelectControl,{label:(0,e.__)("Horizontal Orientation","qi-blocks"),value:t[o("PositionHorizontalOrientation")],options:[{label:(0,e.__)("Left","qi-blocks"),value:"left"},{label:(0,e.__)("Right","qi-blocks"),value:"right"}],onChange:e=>a({[o("PositionHorizontalOrientation")]:e})}),wp.element.createElement(Qt,{label:(0,e.__)("Offset","qi-blocks"),blockAttributeKey:o("PositionHorizontalOffset"),setAttributes:a,blockAttributes:t,rangeMax:1e3,rangeMin:-1e3,rangeDecimalMax:100,rangeDecimalMin:-100,unitType:"measure",allowScreens:!0}),wp.element.createElement(y.SelectControl,{label:(0,e.__)("Vertical Orientation","qi-blocks"),value:t[o("PositionVerticalOrientation")],options:[{label:(0,e.__)("Top","qi-blocks"),value:"Top"},{label:(0,e.__)("Bottom","qi-blocks"),value:"bottom"}],onChange:e=>a({[o("PositionVerticalOrientation")]:e})}),wp.element.createElement(Qt,{label:(0,e.__)("Offset","qi-blocks"),blockAttributeKey:o("PositionVerticalOffset"),setAttributes:a,blockAttributes:t,rangeMax:1e3,rangeMin:-1e3,rangeDecimalMax:100,rangeDecimalMin:-100,unitType:"measure",allowScreens:!0}))),i.includes("responsive")&&wp.element.createElement(y.PanelBody,{title:(0,e.__)("Responsive","qi-blocks"),initialOpen:!1},wp.element.createElement(S,{blockAttributes:t,setAttributes:a})),qiBlocksEditor.vars?.advancedBlockPanel&&wp.element.createElement(wp.element.Fragment,null,Object.entries(qiBlocksEditor.vars.advancedBlockPanel).map(([t,a],l)=>{let n="";if("help"===t?n=(0,e.__)("Help","qi-blocks"):"features"===t&&(n=(0,e.__)("Get more features","qi-blocks")),a.length<=0||"blocks"===t)return"";const o="help"===t,i=r?r.replace("qi-blocks/",""):"",s=a.map((a,l)=>{let n=a?.link;if(0===l&&"help"===t&&i){const e=qiBlocksEditor.vars.advancedBlockPanel?.blocks[i]||"";e&&e?.demo&&(n=e?.demo+"?utm_source=dash&utm_medium=qiblocks&utm_campaign=blocks")}return wp.element.createElement("div",{className:"qodef-m-item"},a?.image?wp.element.createElement(wp.element.Fragment,null,wp.element.createElement("a",{className:"qodef-m-item-image-link",href:a?.link,target:"_blank",rel:"noreferrer"},wp.element.createElement("img",{className:"qodef-m-item-image",src:a.image,alt:a?.title})),wp.element.createElement("p",{className:"qodef-m-item-title"},a?.title),wp.element.createElement("a",{className:"qodef-m-item-button",href:a?.link,target:"_blank",rel:"noreferrer"},(0,e.__)("Upgrade","qi-blocks"))):wp.element.createElement("a",{className:"qodef-m-item-link",href:n,target:"_blank",rel:"noreferrer"},a?.title))});return wp.element.createElement(y.PanelBody,{title:n,className:`qodef-advanced-block-panel-features ${"qodef--"+t} qodef-m`,key:l,initialOpen:o},s)})))}}sa.defaultProps={blockAttributes:{},setAttributes:()=>{},excludePanels:[],previewScreen:"desktop",blockName:""};const ca=(0,o.withSelect)(e=>{let t="desktop";return e("core/edit-post")&&(t="function"==typeof e("core/editor")?.getDeviceType?e("core/editor")?.getDeviceType()?.toLowerCase():e("core/edit-post")?.__experimentalGetPreviewDeviceType()?.toLowerCase()),e("core/edit-site")&&(t="function"==typeof e("core/editor")?.getDeviceType?e("core/editor")?.getDeviceType()?.toLowerCase():e("core/edit-site").__experimentalGetPreviewDeviceType().toLowerCase()),{previewScreen:t,blockName:e("core/block-editor")?.getSelectedBlock()?.name}})(sa);const ua=jQuery;var pa=a.n(ua);const ma={init:function(){this.holder=pa()(".qodef-repeater-option .qodef-repeater-items"),this.holder.length&&this.holder.each(function(){ma.initItem(pa()(this))})},initItem:function(e){e&&e.find(".qodef-repeater-item-heading").off().on("click touchstart",function(e){const t=pa()(this),a=t.parents(".qodef-repeater-item");e.target.classList.contains("qodef-repeater-button")||e.target.classList.contains("dashicon")||(a.hasClass("qodef--active")?(a.removeClass("qodef--active"),t.siblings(".qodef-repeater-item-options").slideUp()):(t.siblings(".qodef-repeater-item-options").slideDown(),a.addClass("qodef--active"),a.siblings().removeClass("qodef--active"),a.siblings().find(".qodef-repeater-item-options").slideUp()))})}},da=ma;function ba(){return ba=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var l in a)({}).hasOwnProperty.call(a,l)&&(e[l]=a[l])}return e},ba.apply(null,arguments)}class fa extends de.Component{constructor(){super(...arguments),this.state={addedItemIndex:""},this.handleAddItem.bind(this),this.handleOnChange.bind(this),this.handleOnRemove.bind(this),this.handleDuplicateItem.bind(this)}componentDidMount(){this.initControlScript()}initControlScript(){setTimeout(()=>{"object"==typeof da&&da.init()},600)}getItems=()=>{const{blockAttributeKey:e,blockAttributes:t}=this.props,a=t[e];return z(this.props,"all")&&a.length?JSON.parse(JSON.stringify(a)):[]};handleAddItem=()=>{const{options:e,blockAttributeKey:t,setAttributes:a}=this.props,l=this.getItems();let n={};e.map(e=>{n[e.optionKey]=e.optionDefaultValue||""}),l.push(n),this.setState({addedItemIndex:l.length-1}),a({[t]:l}),this.initControlScript()};handleOnChange=(e,t,a)=>{const{blockAttributeKey:l,setAttributes:n}=this.props,r=this.getItems();"object"==typeof e?e.key&&e.childKey?r[a][e.key][e.childKey]=t:r[a][e.key]=t:r[a][e]=t,n({[l]:r})};getRepeaterItemValues=(e,t)=>{const a=this.getItems();let l;return l="object"==typeof e?e.key&&e.childKey?a[t][e.key][e.childKey]:a[t][e.key]:a[t][e],U(l)};handleOnRemove=e=>{const{blockAttributeKey:t,setAttributes:a}=this.props,l=this.getItems();l.splice(e,1),a({[t]:l}),this.initControlScript()};handleDuplicateItem=e=>{const{options:t,blockAttributeKey:a,setAttributes:l}=this.props,n=this.getItems();let r={};t.map(t=>{r[t.optionKey]=n[e][t.optionKey]}),n.splice(e+1,0,r),l({[a]:n}),this.initControlScript()};handleOnDrag=(e,t)=>{const{blockAttributeKey:a,setAttributes:l}=this.props,n=this.getItems();let r=(o=n,i=e,s="up"===t?e-1:e+1,function(e,t,a){const l=t<0?e.length+t:t;if(l>=0&&l<e.length){const l=a<0?e.length+a:a,[n]=e.splice(t,1);e.splice(l,0,n)}}(o=[...o],i,s),o);var o,i,s;l({[a]:r}),this.initControlScript()};showItems=()=>{const{options:t,blockAttributes:a,blockAttributeKey:l,setAttributes:n}=this.props,r=this.getItems();return r.length>0&&wp.element.createElement("div",{className:"qodef-repeater-items"},r.map((o,i)=>wp.element.createElement("div",{className:"qodef-repeater-item "+(this.state.addedItemIndex===i?"qodef--active":""),key:i},wp.element.createElement("div",{className:"qodef-repeater-item-heading"},wp.element.createElement("span",{className:"qodef-repeater-item-heading-label"},(0,e.__)(`Item ${i+1}`,"qi-blocks")),wp.element.createElement("div",{className:"qodef-repeater-item-action"},r.length>1&&wp.element.createElement(wp.element.Fragment,null,0!==i&&wp.element.createElement(y.Button,{className:"qodef-repeater-button qodef--move-up",icon:"arrow-up-alt2",text:"",showTooltip:!0,label:(0,e.__)("Move Up","qi-blocks"),onClick:()=>this.handleOnDrag(i,"up")}),r.length!==i+1&&wp.element.createElement(y.Button,{className:"qodef-repeater-button qodef--move-down",icon:"arrow-down-alt2",text:"",showTooltip:!0,label:(0,e.__)("Move Down","qi-blocks"),onClick:()=>this.handleOnDrag(i,"down")})),wp.element.createElement(y.Button,{className:"qodef-repeater-button qodef--duplicate",icon:"admin-page",text:"",showTooltip:!0,label:(0,e.__)("Duplicate Item","qi-blocks"),onClick:()=>this.handleDuplicateItem(i)}),wp.element.createElement(y.Button,{className:"qodef-repeater-button qodef--remove",icon:"no-alt",text:"",showTooltip:!0,label:(0,e.__)("Remove Item","qi-blocks"),onClick:()=>this.handleOnRemove(i)}))),wp.element.createElement("div",{className:"qodef-repeater-item-options"},t.map((e,t)=>{const o=e.optionType;let s=e.optionAttributes||{};const c=e.advancedOptions||!1,u=e.dependency||{},p=Object.prototype.hasOwnProperty.call(u,"value")&&Object.prototype.hasOwnProperty.call(u,"key"),m="string"==typeof u.value?[u.value]:u.value,d=Object.prototype.hasOwnProperty.call(u,"isGlobal")?a[u.key]:r[i][u.key];return s=c?{...s,blockAttributeKey:l,blockAttributes:a,setAttributes:n,repeater:!0,repeaterItemIndex:i,repeaterItemKey:e.optionKey,repeaterSetAttributes:this.handleOnChange,repeaterGetAttributes:this.getRepeaterItemValues}:{...s,onChange:t=>this.handleOnChange(e.optionKey,t,i)},wp.element.createElement("div",{key:t,className:"qodef-repeater-item-option"},(p&&m.includes(d)||!p)&&wp.element.createElement(o,ba({label:e.label||"",placeholder:e.placeholder||"",value:r[i][e.optionKey]},s)))})))))};render(){const{label:t}=this.props;return wp.element.createElement("div",{className:"qodef-repeater-option"},t&&wp.element.createElement("label",{className:"qodef-option-label"},t),this.showItems(),wp.element.createElement(y.Button,{className:"qodef-repeater-button qodef--add",isSecondary:!0,text:(0,e.__)("Add Item","qi-blocks"),onClick:this.handleAddItem}))}}fa.defaultProps={label:(0,e.__)("Items","qi-blocks"),options:[{label:(0,e.__)("Title","qi-blocks"),optionType:y.TextControl,optionKey:"itemTitle",optionDefaultValue:"",optionAttributes:{},advancedOptions:!1,dependency:{}}],blockAttributeKey:"",blockAttributes:{},setAttributes:()=>{},isRichText:!1};const ha=fa;class ga extends de.Component{constructor(){super(...arguments),this.state={isSettingsPanelVisible:!1}}getAttributeValue(e){const{blockAttributes:t,repeater:a,repeaterItemIndex:l,repeaterItemKey:n,repeaterGetAttributes:r}=this.props;let o=t[e];return a&&(o=r({key:n,childKey:e},l)),U(o)}setAttributeValue(e,t){const{setAttributes:a,repeater:l,repeaterItemIndex:n,repeaterItemKey:r,repeaterSetAttributes:o}=this.props;l?o({key:r,childKey:e},t,n):a({[e]:t})}onClick=e=>{e.preventDefault();const t=this;t.setState({isSettingsPanelVisible:!this.state.isSettingsPanelVisible}),window.addEventListener("click",e=>{const a=document.querySelectorAll(".qodef-url-input-control.qodef--opened");a.length&&a.forEach(a=>{a.contains(e.target)||t.setState({isSettingsPanelVisible:!1})})})};render(){const t={...this.props},a={...this.state},{label:l,attrNameTemplate:n,disableSuggestions:r}=t,o=B(n,"Link"),i=B(n,"LinkTargetBlank"),s=B(n,"LinkRelNofollow"),c=B(n,"LinkCustomAttributes");return wp.element.createElement(y.BaseControl,{className:"qodef-url-input-control "+(a.isSettingsPanelVisible?"qodef--opened":"")},wp.element.createElement("div",{className:"qodef-control-heading"},wp.element.createElement("label",{className:"qodef-option-label"},l),wp.element.createElement(y.Button,{onClick:this.onClick,className:"qodef-url-input-settings-button",icon:"admin-settings"})),wp.element.createElement(pe.URLInput,{value:this.getAttributeValue(o),onChange:e=>this.setAttributeValue(o,e),className:"qodef-url-input",disableSuggestions:r}),a.isSettingsPanelVisible&&wp.element.createElement(y.Card,{size:"small"},wp.element.createElement(y.CardBody,null,wp.element.createElement(y.ToggleControl,{label:(0,e.__)("Open in new window","qi-blocks"),checked:this.getAttributeValue(i),onChange:e=>this.setAttributeValue(i,e)}),wp.element.createElement(y.ToggleControl,{label:(0,e.__)("Add nofollow","qi-blocks"),checked:this.getAttributeValue(s),onChange:e=>this.setAttributeValue(s,e)}),wp.element.createElement(y.TextControl,{label:(0,e.__)("Custom Attributes","qi-blocks"),help:(0,e.__)("Set custom attributes for the link element. Separate attribute keys from values using the | (pipe) character. Separate key-value pairs with a comma.","qi-blocks"),value:this.getAttributeValue(c),placeholder:(0,e.__)("key|value","qi-blocks"),onChange:e=>this.setAttributeValue(c,e)}))))}}ga.defaultProps={label:"",attrNameTemplate:"",disableSuggestions:!1,blockAttributes:{},setAttributes:()=>{},repeater:!1,repeaterItemIndex:0,repeaterItemKey:"",repeaterSetAttributes:()=>{},repeaterGetAttributes:()=>{}};const ka=ga,_a=(e,t="")=>{let a={},l={};if(!e)return a;const n=e=>B(t,e);return z(e[n("Link")])&&(a.href=e[n("Link")]),z(e[n("LinkTargetBlank")],"all")&&(a.target="_blank",a.rel="noopener noreferrer"),z(e[n("LinkRelNofollow")],"all")&&(a.rel=void 0!==a.rel?a.rel+" nofollow":"nofollow"),z(e[n("LinkCustomAttributes")])&&(l=((e="")=>{let t=[];if(""!==e){let a=e.split(",");a.length&&a.forEach(e=>{let a=e.trim().split("|");2===a.length&&(t[a[0]]=a[1])})}return t})(e[n("LinkCustomAttributes")])),ue()(a,l)};let va=[];const ya=qiBlocksEditor.vars.systemFontOptions,wa=e=>{let t=!0;return e||(t=!1),ya&&ya.map(({value:e})=>e).forEach(a=>{""!==a&&e===a&&(t=!1)}),t},Aa=e=>{Object.keys(e).filter(e=>e.match(/fontfamily/i)).forEach(t=>{const a=e[t];a&&setTimeout(()=>{(e=>{if(qiBlocksEditor.qodefGetCurrentBlockElement.getIframe()&&(va=[]),va.includes(e))return;const t=qiBlocksEditor.qodefGetCurrentBlockElement.getCurrentDocument();if(t&&wa(e)){const a=t.createElement("link");a.setAttribute("href",(e=>`https://fonts.googleapis.com/css?family=${e.replace(/ /g,"+")}:100,100italic,200,200italic,300,300italic,400,400italic,500,500italic,600,600italic,700,700italic,800,800italic,900,900italic&subset=latin-ext`)(e)),a.setAttribute("rel","stylesheet"),a.setAttribute("type","text/css"),t.querySelector("head").appendChild(a)}va.push(e)})(a)},400)})},qa=(0,me.createHigherOrderComponent)(e=>class extends de.Component{static defaultProps={attributes:{}};componentDidMount(){Aa(this.props.attributes)}render(){return wp.element.createElement(e,this.props)}},"withGoogleFont");var Sa=a(2404),xa=a.n(Sa);const Ea=(0,me.createHigherOrderComponent)(e=>class extends de.Component{static defaultProps={clientId:"",attributes:{},setAttributes:()=>{}};componentDidMount(){const{clientId:e,attributes:t,setAttributes:a}=this.props;t.uniqueClass||a({uniqueClass:this.getNewUniqueClass(e)}),this.reInitUniqueClass(!0)}getNewUniqueClass(e){let t="qodef-block-";return this.props.isFullSiteEditor?t="qodef-template-block-":"widget"===this.props.postID&&(t="qodef-widget-block-"),`${t}${e.substring(0,8)}`}hasParent(e,t){let a=!1,l=e?.parentNode;for(;l;){let e=l;if(e&&e?.classList?.contains(t)){a=!0;break}if(!e?.parentNode)break;l=e.parentNode}return a}reInitUniqueClass(e){const{clientId:t,attributes:a,setAttributes:l,isFullSiteEditor:n}=this.props,{uniqueClass:r}=a,o=qiBlocksEditor.qodefGetCurrentBlockElement.getCurrentDocument(),i=this.getNewUniqueClass(t);let s=!1;if(n){if(r.includes("qodef-block")||r.includes("qodef-widget")){const e=o.querySelector(`.${r}`);if(e){this.hasParent(e,"wp-block-post-content")||(s=!0)}}e&&o.addEventListener("paste",()=>{s=!0})}!n&&r.includes("qodef-template-block")&&(s=!0),""!==r&&r!==i&&o.querySelectorAll(`.${r}`).length>1&&(s=!0),s&&l({uniqueClass:i})}render(){return this.reInitUniqueClass(),wp.element.createElement(e,this.props)}},"withUniqueClass"),Ia=Ea;function Ca(){return Ca=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var l in a)({}).hasOwnProperty.call(a,l)&&(e[l]=a[l])}return e},Ca.apply(null,arguments)}let Ta=[],Na={family:[],weight:[],style:[]};const Ba=e=>{let t="";return Object.entries(e).map(([e,a])=>{if(e.match(/fontfamily/i)){const e=a.replace(/["']/g,"");!Ta.includes(e)&&wa(e)&&(Na.family.push(e),Ta.push(e))}e.match(/fontweight/i)&&Na.weight.push(parseInt(a,10)),e.match(/fontstyle/i)&&Na.style.push(a),t+=`${e.replace(/([A-Z])/g,(e,t,a)=>(a>0?"-":"")+e.toLowerCase())}: ${a};`}),t},Pa=(0,me.createHigherOrderComponent)(e=>class extends de.Component{addPageStyle(e){if(e){const t=this.postID;let a=this.getPageStyles||[],l={key:this.attributes.uniqueClass,values:[],fonts:[]};Ta=[],Na={family:[],weight:[],style:[]},e.forEach((n,r)=>{if(!Object.values(n.styles).every(e=>0===Object.keys(e).length)){const e=["widget","template"].includes(t)?"":`body[class*="-${t}"]`,a=`${e} ${n.selector}`,r=[];"string"!=typeof n.selector&&n.selector.forEach(t=>{t&&r.push(`${e} ${t}`)}),l.values.push({selector:r.length>1?r.join(","):a,styles:Ba(n.styles.desktop||""),tablet_styles:Ba(n.styles.tablet||""),mobile_styles:Ba(n.styles.mobile||""),custom_styles:n.custom_styles||[]}),l.fonts=Na}if(r===e.length-1)if(a&&a.length){let e=!1;a.map((t,n)=>{t.key===l.key&&(e=!0,l.values.length?xa()(t.values,l.values)||(a[n].values=l.values,a[n].fonts=l.fonts):(a[n].values=[],a[n].fonts={family:[],weight:[],style:[]}))}),!e&&l.values.length&&a.push(l)}else"object"==typeof a&&Object.keys(a).length?(a=Object.values(a),a.push(l)):a.push(l);const o=a.filter(e=>e.values.length);qiBlocksEditor.vars.currentPageID=t,qiBlocksEditor.vars.currentPageStyles=o})}}render(){return wp.element.createElement(e,Ca({},this.props,{addPageStyle:this.addPageStyle}))}},"withStyles"),Oa=(0,me.compose)((0,o.withSelect)(e=>{let t=e("core/editor")?.getCurrentPostId()||"widget";const a=!!e("core/edit-site");let l="desktop";return e("core/edit-post")&&(l="function"==typeof e("core/editor")?.getDeviceType?e("core/editor")?.getDeviceType()?.toLowerCase():e("core/edit-post")?.__experimentalGetPreviewDeviceType()?.toLowerCase()),a&&(t="template",l="function"==typeof e("core/editor")?.getDeviceType?e("core/editor")?.getDeviceType()?.toLowerCase():e("core/edit-site").__experimentalGetPreviewDeviceType().toLowerCase()),{previewScreen:l,postID:t,getPageStyles:e("qi-blocks/data/with-styles").getOptions(t).data,isFullSiteEditor:a}}),Ia,Pa);function Da(){return Da=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var l in a)({}).hasOwnProperty.call(a,l)&&(e[l]=a[l])}return e},Da.apply(null,arguments)}class Va extends de.Component{render(){const{attributes:t,setAttributes:a,previewScreen:l}=this.props,{uniqueClass:n,cardsGalleryRepeater:r}=t,o=r[r.length-1]||"",i={"data-orientation":t.orientation||"right","data-scale":""!==t.scaleStep?M(t.scaleStep,"decimal"):.2,"data-offset":""!==t.offsetStep?M(t.offsetStep,"decimal"):25},s=C(t),c=Ee({blockAttributes:t});let u={className:E(t),style:D(c,l),...I(t)};s&&(u.id=s);const p=fe()(T("cards-gallery",this.props),{[`qodef-orientation--${t.orientation}`]:t.orientation});let m=[],d="";if(r&&r.length)for(let e=r.length;e>0;e--){let a={},r={},o={};"both"!==t.orientation?(a=t.scaleStep&&""!==t.scaleStep?j("transform",`scale(calc(1 - ${e-1} * ${M(t.scaleStep,"decimal")}))`):{},r=t.offsetStep&&""!==t.offsetStep?j(t.orientation,`calc( -1 * ${e-1} * ${M(t.offsetStep)}%)`):{}):(a=t.scaleStep&&""!==t.scaleStep?j("transform",`scale(calc(1 - ${Math.floor(e/2)} * ${M(t.scaleStep,"decimal")}))`):{},r=t.offsetStep&&""!==t.offsetStep?j(e%2?"left":"right",`calc( -1 * ${Math.floor(e/2)} * ${M(t.offsetStep)}%)`):{}),o=ue()(a,r),m.push({selector:`.${n} .qodef-orientation--${t.orientation} .qodef-m-card:nth-last-child(${e})`,styles:o}),d+=V(D(o,l))&&`.${n} .qodef-orientation--${t.orientation} .qodef-m-card:nth-last-child(${e}) {\n                        ${V(D(o,l),!1)}\n                    }`}return this.props.addPageStyle([{selector:`.${n}.qodef-block-container`,styles:c},{selector:`.${n} .qi-block-cards-gallery`,styles:{}},...m]),wp.element.createElement(wp.element.Fragment,null,wp.element.createElement(pe.InspectorControls,null,wp.element.createElement(y.TabPanel,{className:"qodef-tab-panel qodef--cards-gallery",activeClass:"qodef--active",tabs:[{name:"content",title:(0,e.__)("Content","qi-blocks")},{name:"style",title:(0,e.__)("Style","qi-blocks")},{name:"advanced",title:(0,e.__)("Advanced","qi-blocks")}]},l=>wp.element.createElement(wp.element.Fragment,null,"content"===l.name&&wp.element.createElement(y.BaseControl,{className:"qodef-base-control-container"},wp.element.createElement(y.SelectControl,{label:(0,e.__)("Image Shuffle Style","qi-blocks"),value:t.orientation,options:[{value:"right",label:(0,e.__)("Shuffle Right","qi-blocks")},{value:"left",label:(0,e.__)("Shuffle Left","qi-blocks")},{value:"both",label:(0,e.__)("Shuffle Left and Right","qi-blocks")}],onChange:e=>a({orientation:e})}),wp.element.createElement(ha,{label:(0,e.__)("Image Items","qi-blocks"),blockAttributeKey:"cardsGalleryRepeater",blockAttributes:t,setAttributes:a,options:[{label:(0,e.__)("Link","qi-blocks"),optionKey:"itemLink",optionDefaultValue:{},advancedOptions:!0,optionType:ka},{label:(0,e.__)("Item Image","qi-blocks"),optionKey:"itemImage",advancedOptions:!0,optionDefaultValue:{id:"",url:qiBlocksEditor.vars.defaultImage,alt:""},optionType:jt}]}),wp.element.createElement(y.SelectControl,{label:(0,e.__)("Image Proportions","qi-blocks"),value:t.imagesProportion,options:[...K("image_sizes",!1),...K("masonry_image_sizes",!1)],onChange:e=>a({imagesProportion:e})})),"style"===l.name&&wp.element.createElement(y.BaseControl,{className:"qodef-base-control-container"},wp.element.createElement(y.RangeControl,{label:(0,e.__)("Scale Step","qi-blocks"),min:.01,max:.5,step:.01,value:t.scaleStep,onChange:e=>a({scaleStep:e}),allowReset:!0,resetFallbackValue:.2}),wp.element.createElement(y.RangeControl,{label:(0,e.__)("Offset Step","qi-blocks"),min:1,max:100,step:1,value:t.offsetStep,onChange:e=>a({offsetStep:e}),allowReset:!0,resetFallbackValue:25})),"advanced"===l.name&&wp.element.createElement(ca,{blockAttributes:t,setAttributes:a})))),wp.element.createElement("style",null,d),wp.element.createElement("div",u,wp.element.createElement("div",Da({className:p},i),wp.element.createElement("div",{className:"qodef-e-inner"},r&&r.length>0&&r.map((e,a)=>wp.element.createElement("div",{key:a,className:"qodef-m-card"},wp.element.createElement("div",{className:"qodef-m-bundle-item"},z(e.itemImage)&&z(e.itemImage.url)&&(z(e.itemLink)&&z(e.itemLink.link)?wp.element.createElement("a",_a(e.itemLink),wp.element.createElement("img",{src:F(e.itemImage.id,t.imagesProportion)||e.itemImage.url,alt:e.itemImage.alt})):wp.element.createElement("img",{src:F(e.itemImage.id,t.imagesProportion)||e.itemImage.url,alt:e.itemImage.alt})))))),""!==o&&z(o.itemImage)&&z(o.itemImage.url)&&wp.element.createElement("div",{className:"qodef-m-fake-card"},wp.element.createElement("img",{src:F(o.itemImage.id,t.imagesProportion)||o.itemImage.url,alt:o.itemImage.alt})))))}}Va.defaultProps={previewScreen:g};const Ra=(0,me.compose)(Oa,qa)(Va);function La(){return La=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var l in a)({}).hasOwnProperty.call(a,l)&&(e[l]=a[l])}return e},La.apply(null,arguments)}class Ma extends de.Component{render(){const{attributes:e}=this.props,{cardsGalleryRepeater:t}=e,a=t[t.length-1]||"",l={"data-orientation":e.orientation||"right","data-scale":""!==e.scaleStep?M(e.scaleStep,"decimal"):.2,"data-offset":""!==e.offsetStep?M(e.offsetStep,"decimal"):25},n=C(e);let r={className:E(e),...I(e)};n&&(r.id=n);const o=fe()(T("cards-gallery",this.props),{[`qodef-orientation--${e.orientation}`]:e.orientation});return wp.element.createElement("div",r,wp.element.createElement("div",La({className:o},l),wp.element.createElement("div",{className:"qodef-e-inner"},t&&t.length>0&&t.map((t,a)=>wp.element.createElement("div",{key:a,className:"qodef-m-card"},wp.element.createElement("div",{className:"qodef-m-bundle-item"},z(t.itemImage)&&z(t.itemImage.url)&&(z(t.itemLink)&&z(t.itemLink.link)?wp.element.createElement("a",_a(t.itemLink),wp.element.createElement("img",{className:t.itemImage.id?`wp-image-${t.itemImage.id}`:"",src:F(t.itemImage.id,e.imagesProportion)||t.itemImage.url,alt:t.itemImage.alt})):wp.element.createElement("img",{className:t.itemImage.id?`wp-image-${t.itemImage.id}`:"",src:F(t.itemImage.id,e.imagesProportion)||t.itemImage.url,alt:t.itemImage.alt})))))),""!==a&&z(a.itemImage)&&z(a.itemImage.url)&&wp.element.createElement("div",{className:"qodef-m-fake-card"},wp.element.createElement("img",{className:a.itemImage.id?`wp-image-${a.itemImage.id}`:"",src:F(a.itemImage.id,e.imagesProportion)||a.itemImage.url,alt:a.itemImage.alt}))))}}const za=Ma,Ua={attributes:{cardsGalleryRepeater:[{itemLink:{},itemImage:{id:"",url:qiBlocksEditor.vars.defaultThumbnail,alt:""}},{itemLink:{},itemImage:{id:"",url:qiBlocksEditor.vars.defaultThumbnail,alt:""}},{itemLink:{},itemImage:{id:"",url:qiBlocksEditor.vars.defaultThumbnail,alt:""}}],scaleStep:.2,offsetStep:25,orientation:"right",imagesProportion:"full"}};var Ka=a(5072),ja=a.n(Ka),Fa=a(7825),Ga=a.n(Fa),$a=a(7659),Ha=a.n($a),Wa=a(5056),Xa=a.n(Wa),Ya=a(540),Za=a.n(Ya),Ja=a(1113),Qa=a.n(Ja),el=a(9008),tl={};tl.styleTagTransform=Qa(),tl.setAttributes=Xa(),tl.insert=Ha().bind(null,"head"),tl.domAPI=Ga(),tl.insertStyleElement=Za();ja()(el.A,tl);el.A&&el.A.locals&&el.A.locals;var al;function ll(){return ll=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var l in a)({}).hasOwnProperty.call(a,l)&&(e[l]=a[l])}return e},ll.apply(null,arguments)}const nl=e=>s.createElement("svg",ll({xmlns:"http://www.w3.org/2000/svg",xmlSpace:"preserve",width:24,height:24},e),al||(al=s.createElement("path",{fill:"none",stroke:"#EE2852",strokeMiterlimit:10,d:"M1.508 3.531h15v17.031h-15zM16.516 5.417H19.5v13.26h-2.984zM19.5 7.311h3.024v9.471H19.5z"})));(0,t.registerBlockType)("qi-blocks/cards-gallery",{icon:wp.element.createElement(nl,null),title:(0,e.__)("Cards Gallery","qi-blocks"),description:(0,e.__)("Create interactive presentations with images set on top of each other; once an image from the stack is clicked on, it moves to the top. ","qi-blocks"),category:"qi-blocks",keywords:[(0,e.__)("creative","qi-blocks"),(0,e.__)("interactive","qi-blocks"),(0,e.__)("shuffle","qi-blocks"),(0,e.__)("image","qi-blocks"),(0,e.__)("stacked images","qi-blocks"),(0,e.__)("qi","qi-blocks")],attributes:se,example:Ua,edit:Ra,save:za})})()})();